Bug in PB-Editor

Just starting out? Need help? Post your questions and find answers here.
Splunk
User
User
Posts: 36
Joined: Wed Apr 21, 2021 6:53 pm

Bug in PB-Editor

Post by Splunk »

Hi guys,

the idea to highlight a term by double-clicking (e.g. a variable) in the editor at all places in the source code is absolutely great. Has already helped me a lot and I would not want to miss more. But by chance I discovered a small bug where it doesn't work as it should (I'm using PB 5.41, maybe the bug is already known and not present in the newer versions?).

Example code 1:

Days = 10
Time = Date()-Days*60*60*24

A double-click in line 1 on "Days" does not show me "Days" in line 2 (because of "*").


Example code 2:

Days = 10
Time = Date()-Days *60*60*24

Here it works.

// Moved from "Bugs - Windows" to "Coding Questions" (Kiffi)
User avatar
STARGÅTE
Addict
Addict
Posts: 2067
Joined: Thu Jan 10, 2008 1:30 pm
Location: Germany, Glienicke
Contact:

Re: Bug in PB-Editor

Post by STARGÅTE »

This is no bug. This is because the * is counted as extra character by default (as same as # $ and %).
You can change this behavior in the settings: Preference -> Editor -> Editing -> Extra characters included in word selection: $#*%
PB 6.01 ― Win 10, 21H2 ― Ryzen 9 3900X, 32 GB ― NVIDIA GeForce RTX 3080 ― Vivaldi 6.0 ― www.unionbytes.de
Lizard - Script language for symbolic calculations and moreTypeface - Sprite-based font include/module
Fred
Administrator
Administrator
Posts: 16617
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: Bug in PB-Editor

Post by Fred »

I think It could be improved though to avoid cases like that.
Mr.L
Enthusiast
Enthusiast
Posts: 104
Joined: Sun Oct 09, 2011 7:39 am

Re: Bug in PB-Editor

Post by Mr.L »

It also would be nice, if constants in the help file were selected fully, when double clicked.
That would make it easyer to copy / paste it into the source code.
At the moment, only the part between the '_' (underscore) characters is selected.
BarryG
Addict
Addict
Posts: 3292
Joined: Thu Apr 18, 2019 8:17 am

Re: Bug in PB-Editor

Post by BarryG »

Constants in the Help file are out of Fred's control, because it's a Windows app displaying the file.
TassyJim
Enthusiast
Enthusiast
Posts: 151
Joined: Sun Jun 16, 2013 6:27 am
Location: Tasmania (Australia)

Re: Bug in PB-Editor

Post by TassyJim »

Mr.L wrote: Mon Jan 30, 2023 6:41 pm It also would be nice, if constants in the help file were selected fully, when double clicked.
Try tripple-click.
That works for me in most instances.
BarryG
Addict
Addict
Posts: 3292
Joined: Thu Apr 18, 2019 8:17 am

Re: Bug in PB-Editor

Post by BarryG »

For me, triple-click selects the entire line of code when the constant is triple-clicked.
TassyJim
Enthusiast
Enthusiast
Posts: 151
Joined: Sun Jun 16, 2013 6:27 am
Location: Tasmania (Australia)

Re: Bug in PB-Editor

Post by TassyJim »

You are right, I was looking at the PureBasic Constants chapter of the help files.
The constants are in their own field of the table which is why triple-click works.

Jim
BarryG
Addict
Addict
Posts: 3292
Joined: Thu Apr 18, 2019 8:17 am

Re: Bug in PB-Editor

Post by BarryG »

Thanks for your clarification. I was seriously wondering why it "worked" for you but not me. Phew!
Post Reply