Page 2 of 3

Re: PB6.11 LTS : Editor's "Remove Comments" acts funny...

Posted: Sun Jul 07, 2024 12:14 pm
by moulder61
Using Linux here too, 6.04 LTS and 6.11 LTS both doing it.
I'm sure it didn't happen before? Where has this come from all of a sudden?
I did notice that if you comment a commented line again from the first column then CTRL+SHIFT+B will uncomment it successfully.

Moulder.

Re: PB6.11 LTS : Editor's "Remove Comments" acts funny...

Posted: Sun Jul 07, 2024 12:20 pm
by BarryG
Maybe it's to do with the source file's encoding? But that wouldn't explain why it works for me with a clean install.

Re: PB6.11 LTS : Editor's "Remove Comments" acts funny...

Posted: Sun Jul 07, 2024 12:46 pm
by mk-soft
Remove/Rename the /home/[username]/.purebasic/purebasic.pref

Re: PB6.11 LTS : Editor's "Remove Comments" acts funny...

Posted: Sun Jul 07, 2024 2:32 pm
by Blue
mk-soft wrote: Sun Jul 07, 2024 12:46 pm Remove/Rename the /home/[username]/.purebasic/purebasic.pref
Been there, done that. :D :lol:
That will achieve nothing, besides erasing custom settings the user has accumulated over time. :oops:
Following a similar suggestion from BarryG (see previous posts), I did exactly that, then a clean install, and all for nought. No effect whatsoever.

@ BarryG :
To satisfy your curiosity, I’ll try and record a short video of the quirk in action. But don’t hold your breath waiting for it. :)
Here's the link: https://imgur.com/0S3EcIw . My video is not as revealing and good as yours because my fingers aren't as agile anymore...

Whooo… So much time and so many words spent on a very minor annoyance. Who would have thought?

Re: PB6.11 LTS : IDE's "Remove Comments" acts funny...

Posted: Mon Jul 08, 2024 7:51 am
by Demivec
For me, on Windows 10 x64 using PureBasic v6.11 LTS x64:

1. When pressing Ctrl+B the line is commented and highlighted no matter which column the cursor is in.
2. When pressing Shift+Ctrl+B the line is uncommented and highlighted as long as the cursor is not in column 1.
3. When pressing Shift+Ctrl+B on a uncommented line the line is highlighted as long as the cursor is not in column 1.
4. When pressing Shift+Ctrl+B on a line (whether commented or not) and with the cursor in column 1 the cursor is moved to the end of the previous line and the previous line has a highlight placed on what seems to be the EOL character/marker.
5. When pressing Shift+Ctrl+B on the first line (whether commented or not) and with the cursor in column 1 the cursor is moved to the end of the line after all lines and all text from the first line down to the last line is highlighted.


The expected behavoir for me (not based on past performance :) ) would be that the behavoir is the same when the cursor is in the first column as when it is in any other column, definitely not what occurs in situation 4 or 5 above.

Re: PB6.11 LTS : IDE's "Remove Comments" acts funny...

Posted: Mon Jul 08, 2024 9:01 am
by #NULL
2 more observations:
- in BarryG's GIF there is no selection taking place after perfoming these functions, like it does for me and others.
- when selecting multiple lines, even when selecting backwards so that the cursor is at column 1 of first selected line, 'remove comment' works correctly.

Re: PB6.11 LTS : IDE's "Remove Comments" acts funny...

Posted: Mon Jul 08, 2024 9:06 am
by BarryG
#NULL wrote: Mon Jul 08, 2024 9:01 amin BarryG's GIF there is no selection taking place after perfoming these functions, like it does for me and others
What do you mean? Tell me the steps and I can test again?

Re: PB6.11 LTS : IDE's "Remove Comments" acts funny...

Posted: Mon Jul 08, 2024 9:07 am
by #NULL
@BarryG
In your GIF it looks like from the cursor movement that your are adding/removing semicolons in front of single lines manually, not with cntrl+b / cntrl+shift+b, and you do this only with multiple lines.

Re: PB6.11 LTS : IDE's "Remove Comments" acts funny...

Posted: Mon Jul 08, 2024 9:14 am
by BarryG
Oh, I thought the hotkey for comment/uncomment was only for SELECTED text, and not at the start or middle of a line with NO selection. Today I learned. But yeah, I just tried that now and the lines still comment/uncomment normally here as well. I can make another video if you like.

Re: PB6.11 LTS : IDE's "Remove Comments" acts funny...

Posted: Mon Jul 08, 2024 9:32 am
by #NULL
cntrl+b
pos1 :wink:
cntrl+shift+b

Re: PB6.11 LTS : IDE's "Remove Comments" acts funny...

Posted: Mon Jul 08, 2024 10:49 am
by BarryG
#NULL wrote: Mon Jul 08, 2024 9:32 am cntrl+b
pos1 :wink:
cntrl+shift+b
Ah, now I get the same issue. :lol:

But, this is NOT a bug. The manual clearly says Ctrl+B and Shift+Ctrl+B is for the SELECTED code or line. So if no code or line isn't selected (no text highlighted), then you get the problem. I'm using it the way the manual says, and thus never get the problem. ;) You can't use this feature on non-selected lines. Just because the cursor is on a line, doesn't mean that line is selected. That's just the cursor position.

Source -> https://www.purebasic.com/documentation ... iting.html

Image

Re: PB6.11 LTS : IDE's "Remove Comments" acts funny...

Posted: Mon Jul 08, 2024 12:33 pm
by moulder61
@ BarryG

"Selected". That seems to be the answer. I should have read the manual. ;)

Moulder.

Re: PB6.11 LTS : IDE's "Remove Comments" acts funny...

Posted: Mon Jul 08, 2024 12:34 pm
by BarryG
Can't tell if you're being sarcastic or not. :?

Re: PB6.11 LTS : IDE's "Remove Comments" acts funny...

Posted: Mon Jul 08, 2024 1:13 pm
by moulder61
@BarryG

No, not at all. Some kind of mass hysteria came over us, well mainly me, and thought it had all gone tits up.
I must never have tried to uncomment one line before without selecting it, so all of a sudden it looked like there was a problem.

Moulder.

P.S. I am very good at sarcasm if I want to be. :p

Re: PB6.11 LTS : IDE's "Remove Comments" acts funny...

Posted: Mon Jul 08, 2024 2:15 pm
by #NULL
So it's a feature request then :)
And cursor position and selection should be restored to exactly what it was before in all cases.