[Done] PB6.11 LTS : IDE's "Remove Comments" acts funny...

Post bugs related to the IDE here
User avatar
Blue
Addict
Addict
Posts: 964
Joined: Fri Oct 06, 2006 4:41 am
Location: Canada

[Done] PB6.11 LTS : IDE's "Remove Comments" acts funny...

Post by Blue »

system : Windows 11 X64
PB : 6.11 LTS

Could a forum moderator move this topic to Bugs - IDE ?
My mistake - I didn’t see the specific section since I keep thinking of the IDE as “the Editor”…


In the PB Editor, when...
1. the cursor is at the begining of a line
2. and you "Uncomment" the line
the line stays commented AND the cursor jumps to the end of the previous line.
If the cursor is at any other position in the line, everything works as expected : the line gets uncommented and the cursor stays put.

Code: Select all

; --------------
; comment/uncomment any of the following lines to verify this unexpected behaviour

;:: constantes gadgets   
  Enumeration
    #zChoisir_CMD
    #zExplorer_CMD
; 
;     #zRemplacerPar_LABEL
;     #zRemplacerPar_STR
;     #zRemplacerPar_COUNT
;     #zRemplacerPar_CLEAR
  EndEnumeration
A short (and NOT very good :oops: ) video showing this misbehaviour in action.
https://imgur.com/0S3EcIw
Wherever you see the cursor jumping to the end of the line above, is when the Uncomment combination was pressed, but the line was not uncommented. Notice as well that pressing this KB combination on a line without any comment produces the same effect.
Last edited by Blue on Sun Jul 07, 2024 5:33 pm, edited 3 times in total.
PB Forums : Proof positive that 2 heads (or more...) are better than one :idea:
PBJim
Enthusiast
Enthusiast
Posts: 294
Joined: Fri Jan 19, 2024 11:56 pm

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

Post by PBJim »

Yes, you're referring to the function Shift-Ctrl/B, I think. I'm using PB 6.00 LTS and it's been like that since I started using PB. The cursor must first be moved away from the first character position. I've always regarded it as a quirk.
User avatar
Mindphazer
Enthusiast
Enthusiast
Posts: 456
Joined: Mon Sep 10, 2012 10:41 am
Location: Savoie

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

Post by Mindphazer »

Confirmed
Same behaviour on MacOS (PB 6.11, i haven't tested on a previous PB version)
MacBook Pro 16" M4 Pro - 24 Gb - MacOS 15.4.1 - Iphone 15 Pro Max - iPad at home
...and unfortunately... Windows at work...
User avatar
Blue
Addict
Addict
Posts: 964
Joined: Fri Oct 06, 2006 4:41 am
Location: Canada

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

Post by Blue »

PBJim wrote: Sat Jul 06, 2024 7:53 pm [...] I've always regarded it as a quirk.
Quirk.
That's the word i was looking for.
Thank you, PBJim.
PB Forums : Proof positive that 2 heads (or more...) are better than one :idea:
PBJim
Enthusiast
Enthusiast
Posts: 294
Joined: Fri Jan 19, 2024 11:56 pm

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

Post by PBJim »

Blue wrote: Sat Jul 06, 2024 8:17 pm
PBJim wrote: Sat Jul 06, 2024 7:53 pm [...] I've always regarded it as a quirk.
Quirk.
That's the word i was looking for.
Thank you, PBJim.
Glad to provide a descriptive word for it :D The IDE, which is really what this relates to, does have a few quirky aspects, although I think it's very dependable. The other oddity that I live with but moan about often, is that when you're searching with F3 and the next occurrence of the search item happens to be in the same screen at which you're already positioned, it insists on re-positioning again with that next line on row 4, so you lose your continuity in terms of where you are in relation to the previous occurrence.
User avatar
Blue
Addict
Addict
Posts: 964
Joined: Fri Oct 06, 2006 4:41 am
Location: Canada

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

Post by Blue »

@PBJim :
Right on ! So far, 2/2 for you.

I find the repositioning of text in the IDE (another term that keeps escaping me…) after a search request almost as frustrating as its jumping onto the current occurrence of a word or expression rather than onto the next one as the label on the [Find Next] button would lead you to believe…

However, as you point out, we do forgive a lot of the IDE annoyances because it is a clever and solid piece of software that allows us to experiment a lot without actually setting the machine on fire.
PB Forums : Proof positive that 2 heads (or more...) are better than one :idea:
BarryG
Addict
Addict
Posts: 4121
Joined: Thu Apr 18, 2019 8:17 am

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

Post by BarryG »

Can't confirm any issues here? Any line commented and uncommented works as expected, with syntax coloring applied when uncommented.
User avatar
Blue
Addict
Addict
Posts: 964
Joined: Fri Oct 06, 2006 4:41 am
Location: Canada

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

Post by Blue »

BarryG wrote: Sun Jul 07, 2024 2:17 am Can't confirm any issues here?
… and this occurs with the cursor positioned at the very beginning of a commented line (column 1) ?
Surprising… :shock: because I have verified that this occurs no matter where a comment appears on line. In fact, I just checked that it even occurs when you press Ctrl +Shift+B on a line without any comment whatsoever.
PB Forums : Proof positive that 2 heads (or more...) are better than one :idea:
BarryG
Addict
Addict
Posts: 4121
Joined: Thu Apr 18, 2019 8:17 am

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

Post by BarryG »

Blue wrote: Sun Jul 07, 2024 2:27 amthis occurs with the cursor positioned at the very beginning of a commented line (column 1) ?
Correct. Here's a video of it, from column 1, with manual add/remove of ";" and with Ctrl+B and Shift+Ctrl+B -> https://i.imgur.com/3MJhq9E.mp4

I get this same expected behaviour on Windows 11 as well. Have you tried it with a clean install of PureBasic?
User avatar
Blue
Addict
Addict
Posts: 964
Joined: Fri Oct 06, 2006 4:41 am
Location: Canada

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

Post by Blue »

@BarryG :
Very convincing video : I think you tried every possibility, and, indeed, everything behaves normally. Very strange…

My install of PB 6.11 LTS is a clean install… except for the preferences file.
There’s too much custom information for me to want to rebuild it from scratch.
So, maybe it’s NOT such a clean install after all.

I’ll give that a try tomorrow (virgin PB install) and see what, if anything, improves.
Thanks for your very thorough testing, BarryG.
PB Forums : Proof positive that 2 heads (or more...) are better than one :idea:
BarryG
Addict
Addict
Posts: 4121
Joined: Thu Apr 18, 2019 8:17 am

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

Post by BarryG »

Blue wrote: Sun Jul 07, 2024 5:21 amMy install of PB 6.11 LTS is a clean install… except for the preferences file
Yeah you have to remove the Prefs file too for it to be a clean install. ;)
User avatar
Blue
Addict
Addict
Posts: 964
Joined: Fri Oct 06, 2006 4:41 am
Location: Canada

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

Post by Blue »

BarryG wrote: Sun Jul 07, 2024 5:40 am Yeah you have to remove the Prefs file too for it to be a clean install. ;)
All right : i did as BarryG suggested (virgin install with prexisting conditions erased, cleared, zapped, destroyed, annihilated, kaputed, etc) (You get the idea, I'm sure)... and NO CHANGE :
Ctrl + Shift + B still does its funny thing when the text cursor is in column one : the cursor jumps to the end of the line above, without affecting the current line at all.

So, I do not understand why on BarryG's machine the IDE appears to behave normally, while on mine (and on others — see above) it behaves in an unexpected way. I could make a video to show you, but I don't have BarryG's patience, energy and dedication.

For good measure, I even restarted Windows. No dice...
PB Forums : Proof positive that 2 heads (or more...) are better than one :idea:
BarryG
Addict
Addict
Posts: 4121
Joined: Thu Apr 18, 2019 8:17 am

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

Post by BarryG »

Blue wrote: Sun Jul 07, 2024 6:12 amI do not understand why on BarryG's machine the IDE appears to behave normally
I tried on WIn 10 and Win 11 (two machines, desktop and laptop). Same result.
PBJim wrote: Sat Jul 06, 2024 7:53 pmThe cursor must first be moved away from the first character position. I've always regarded it as a quirk.
I've never had to move the cursor off the start of a line when un/commenting in over 20 years of using PureBasic, so I've never experienced this quirk. First time I've heard of it. Very strange that it's happening for others. Would love to see a video of it.
#NULL
Addict
Addict
Posts: 1497
Joined: Thu Aug 30, 2007 11:54 pm
Location: right here

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

Post by #NULL »

Happens here on linux too. Has been so since a long time i think. BarryG, could it be you are using a different scintilla component, like it was discussed in a different thread?

Usually after 'Remove Comment' the line is selected, but in the faulty case the newline/linebreak before it seems to be selected. I tried with different settings for linebreak and file format but that didn't seem to make any difference.
BarryG
Addict
Addict
Posts: 4121
Joined: Thu Apr 18, 2019 8:17 am

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

Post by BarryG »

Just using a default PB 6.11 install with whatever Scintilla it comes with, because that issue in the other thread was resolved, so now I only use default PureBasic installs again.
Post Reply