This bug is related with a Notepad++ issue: https://github.com/notepad-plus-plus/notepad-plus-plus/issues/3150
Steps to reproduce:
1- Open Notepad++ or SciTE;
2- Change the language to "Properties";
3- Write a line with more than 1024 characters;
4- Comment the line (I typed # at the beginning);
5- Verify that every character after the 1024th one is not commented.
Two rewritten lexers, fix this bug and improve DBCS safety for looking assignment in line buffer.
LexProps-foldComment.cxx support folding comment, the fold code may need improved.
Change
unsigned char ch = styler[i];tochar ch = styler[i];.foldCompact is removed, as it not relevant to this lexer: section last to next section or end of document, so already compact.
fold comment can move to a separator feature request if it mater.
The changes differ widely from the original in ways that are not addressing the bug.
The bug is at:
|| (linePos >= sizeof(lineBuffer) - 1).Last edit: Zufu Liu 2019-10-26
include headers need reordered as (according to HeaderCheck.py):
Just fix originally 1024 bytes bug is easy, but the lexer has bug for DBCS characters when looking for assignment.
Not relevant to this bug.
Fix committed as [56b648]. Uses std::string to avoid fixed limit.
Example text where last 5 characters are not in comment colour:
Related
Commit: [56b648]
I think the same patch (convert to std::string) can be applied to other lexers that uses the same
char lineBuffer[1024]loop, like LexYAML [bugs:#2134], LexMake and LexBatch (has many bugs itself).Related
Bugs:
#2134I don't think very long lines are common enough in Make or Batch to be worth working on. YAML is more likely but its still low priority.
Fix committed as [56b648]. Uses std::string to avoid fixed limit.
Example text where last 5 characters are not in comment colour:
Related
Commit: [56b648]