Sven Strickroth:
> the diff lexer doesn't correctly parse/colorize deleted lines starting
> with "--“.
There is a related bug at
https://sourceforge.net/p/scintilla/bugs/1823/
> There are two cases, whereas I can provide a fix for the first one.
>
> A deleted line "-->" is parsed as HEADER (the attached patch
> "Correctly-color-code-deleted-lines-starting-with" fixes this).
The patch seems reasonable.
> When you open example.patch you can see, that a deleted line which only
> contains "--" is also colored wrongly, however, the fix is not that easy
> and requires context (i.e., we already parsed the header and are in a
> hunk context). I'm not sure how to quell this w/o breaking stuff and,
> thus, I haven't worked on a patch. - Here unittests with a set of
> example files and the the expected parsing would help a lot.
Its quite difficult as patch formats overlap and they are generated by different programs and may be processed in various ways such as being copied and pasted from terminal sessions or passed through mailers.
Neil