Page 1 of 1

Case correction is too aggressive

Posted: Sun Feb 07, 2016 5:45 am
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?

Re: Case correction is too aggressive

Posted: Sun Feb 07, 2016 1:49 pm
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.

Re: Case correction is too aggressive

Posted: Sun Feb 07, 2016 6:36 pm
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

Re: Case correction is too aggressive

Posted: Mon Feb 08, 2016 4:23 pm
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.

Re: Case correction is too aggressive

Posted: Mon Feb 08, 2016 4:33 pm
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).