Platform: Windows 7
An if condition before SciTE v5.3.9 ended at a non-indented statement.
Seems patch [40044f] changed the behaviour which I used as reference of where to cout what properties was being read. The if condition can now end at an empty line as I discovered. There was no need AFAIK to change the behaviour, so I view it as an unintentional bug with code improvements.
This used to be ok, now is not ok. The style property is read and set although is not wanted.
theme.dark=0
if theme.dark
style.*.32=fore:#000000,back:#FFC0C0,$(font.base)
non_indented_statement=0
If the 4th line has a space or tab which is an indented line, then it is ok. The style property will not be read and set.
SciTE v5.3.9 doc excerpt (included header) states:
Importing properties files and conditional logic
When a non-indented statement is found the if clause is finished.
If the new behaviour is to remain, then suggest that the word statement be replaced with line or something better if perferred. If the behaviour is to be changed back, that would be appreciated!
At the moment, this theme file has empty lines which now has issues. Setting theme.dark=0 keeps the dark style settings when light style settings is wanted. I'll have to make changes to the linked theme file if the new behaviour is to remain.
The original
GetFullLinediscarded initial empty lines but the new version returns them. It seems more extensible to me to return the empty lines then treat them as having no effect in the laterReadLinemethod.I have the
coutafter} else if (!IsCommentLine(lineBuffer)) {line at bottom of thatReadLinemethod. I'm usingimport.include=f4to reduce properties being imported by recompiled Sc1. The last patch applied prints 4413 lines while unpatched prints 6356 lines so the patch saves going to the end of the method 1943 times, so that is an efficient improvement by returning early with empty lines instead of checking if startswithmodule,if,match,importand then callingIsCommentLineand the behaviour has changed back to allow empty lines after theifstatement.Updated local repos and recompiled for main working copy of Sc1 and is working good with current theme file once again that includes empty lines and so has old behaviour back.
If your patch interests you as a fix, then that makes both of us. Thankyou Neil for looking into this. :)
Committed fix as [08f048].
Related
Commit: [08f048]