Case correction is too aggressive

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
kpeters58
Enthusiast
Enthusiast
Posts: 341
Joined: Tue Nov 22, 2011 5:11 pm
Location: Kelowna, BC, Canada

Case correction is too aggressive

Post by kpeters58 »

I do use and appreciate PureBasic's case correction.

I often have longer strings that contain PureBasic keywords, such as 'for' and 'to', for instance.

The moment I edit one of these and overwrite/remove the leading double-quote (whether on purpose or accidentally), PureBasic immediately goes to work and uppercases such keywords.

In the best case that is annoying; in the worst case such improper spelling may end up in the hands of customers...

Maybe there is a way to suppress this behavior once a trailing doublequote is detected?
PB 5.73 on Windows 10 & OS X High Sierra
User avatar
Michael Vogel
Addict
Addict
Posts: 2797
Joined: Thu Feb 09, 2006 11:27 pm
Contact:

Re: Case correction is too aggressive

Post by Michael Vogel »

+1
Maybe strings shouldn't be changed before 'enter' will have been pressed (similar to some commands like "endif").
But it would be already a step forward, if the undo function would work to change the altered characters to it's prevoius state.
User avatar
dobro
Enthusiast
Enthusiast
Posts: 766
Joined: Sun Oct 31, 2004 10:54 am
Location: France
Contact:

Re: Case correction is too aggressive

Post by dobro »

kpeters58 wrote: PureBasic immediately goes to work and uppercases such keywords.
if I understand what you write
not Purebasic putting keywords in uppercase
but is IDE ;)

exchange your IDE
Image
Windows 98/7/10 - PB 5.42
■ sites : http://michel.dobro.free.fr/
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: Case correction is too aggressive

Post by IdeasVacuum »

...it possibly isn't that easy to fix, a number of IDE's have the same issue. Perhaps a button on the IDE to toggle case correction on-off? Or, perhaps better, case-correction only invoked by either Syntax Check or Compile.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
User avatar
kenmo
Addict
Addict
Posts: 2033
Joined: Tue Dec 23, 2003 3:54 am

Re: Case correction is too aggressive

Post by kenmo »

Yes, it can be annoying to modify a doublequote and suddenly every keyword in your string becomes capitalized (plus Undo does not undo case correction).

A workaround is to temporarily throw a ';' at the start of the line, to comment it out before modifying complex strings.

It might be better if the IDE only case-corrected words when you finish them (either by typing or auto-complete).
Post Reply