10-14-2022, 04:14 AM
(10-13-2022, 09:49 PM)Pete Wrote: If you turn SYNTAX CHECKING off, and then paste in something with a syntax error, which is also not indented, auto-indent will not occur. Apparently even though the syntax error is not reported in the IDE, it still notices the error and refuses to auto-indent the code as pasted.
I don't think what you're seeing is new, I'm pretty sure the auto-indent has always worked that way and stops indenting if it finds an invalid line regardless of how it gets there (pasted or just typed in).
I'd have to go digging but I would assume even when you turn the "syntax checker" off it still runs all the compilation logic and the syntax checking is used to do the auto indentation (and just doesn't report errors to you). I don't think this is really fixable because parsing the syntax is necessary to properly do the indentation. Lines like
FOR i = 1 TO 20: NEXTrequire parsing the full line to understand the indentation of the following lines, and if you have Ex. a syntax error on a
LOOPline then the auto indentation would screw everything up if it tried to ignore that line and keep going.