aboutsummaryrefslogtreecommitdiffhomepage
path: root/lexers/LexDiff.cxx
diff options
context:
space:
mode:
authorSven Strickroth <email@cs-ware.de>2017-01-22 17:41:23 +1100
committerSven Strickroth <email@cs-ware.de>2017-01-22 17:41:23 +1100
commit013bf48bff4164a02137b2e790bbed8b32c4e98e (patch)
treec59563b3dd25346500298afdee928d0cc491df66 /lexers/LexDiff.cxx
parenteec253d225f0e3d8eb594b8dfa8fe24e2d2dcb17 (diff)
downloadscintilla-mirror-013bf48bff4164a02137b2e790bbed8b32c4e98e.tar.gz
Correctly color code deleted lines starting with "--"
This fixes the coloring of deleted lines in which starts with "--" such as closing HTML comments ("-->"). Signed-off-by: Sven Strickroth <email@cs-ware.de>
Diffstat (limited to 'lexers/LexDiff.cxx')
-rw-r--r--lexers/LexDiff.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/lexers/LexDiff.cxx b/lexers/LexDiff.cxx
index baa8368f6..bfc22b9f6 100644
--- a/lexers/LexDiff.cxx
+++ b/lexers/LexDiff.cxx
@@ -51,8 +51,10 @@ static void ColouriseDiffLine(char *lineBuffer, Sci_Position endLine, Accessor &
styler.ColourTo(endLine, SCE_DIFF_POSITION);
else if (lineBuffer[3] == '\r' || lineBuffer[3] == '\n')
styler.ColourTo(endLine, SCE_DIFF_POSITION);
- else
+ else if (lineBuffer[3] == ' ')
styler.ColourTo(endLine, SCE_DIFF_HEADER);
+ else
+ styler.ColourTo(endLine, SCE_DIFF_DELETED);
} else if (0 == strncmp(lineBuffer, "+++ ", 4)) {
// I don't know of any diff where "+++ " is a position marker, but for
// consistency, do the same as with "--- " and "*** ".