TCoolEdit renders whitespace as operators
Borland's Object Windows Library for the modern age
Brought to you by:
jogybl,
sebas_ledesma

Note that the fix [r7148] merely corrects the syntax category, hence the issue with overproduction of blocks remains.
I implemented the fix this way, because it is focused and low-risk, unlikely to create a regression.
However, a more comprehensive, yet riskier, fix would skip consecutive whitespace characters:
In my limited testing with the C++ parser, this better fix seems to work well, and it reduces the block count substantially.
Note that nPos is a temporary variable that might be equal to the character index I or one less, depending on the state of bDecIndex at the top of the for-loop, so I made sure the whitespace skipping would work in both cases.
Regarding those boolean variables, I don't fully understand how they are supposed to work, and whether they are (both) needed here or not. I just kept the code as before, since removing them didn't quite work, and I wasn't prepared to review and rewrite the whole code.
Let me know if you see any issues with this better fix. Try it out. If it works well for you in thorough testing, I might commit it.
Otherwise, I'll leave this here just as a suggestion for improvement.
Related
Commit: [r7148]
The optimised solution (scanning the whitespace in one go and producing only one TTextBlock for each span) was implemented in the overhaul of TCSyntaxParser [r7154][feature-requests:#252]. The new implementation produces very few superfluous blocks, if any.
Related
Commit: [r7154]
Feature Requests: #252
HI Vidar:
I just ended reviewing the optimized fix and it looked fine for me.
I specially like the idea to have a better and faster OWLMaker/CoolEdit editor.
Thanks Sebastian, for reviewing the code! If you hadn't been willing to do so, I wouldn't have committed it. Hopefully, it hasn't created (too many) regressions. I shudder to think that OWLMaker may now crash just by viewing a file due to a bug in my eager refactorisation. Well — no risk, no reward. Test well, and test again! :-)