From 4ff53fe211776606dc43cd32340d08ae300a7197 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Thu, 3 Mar 2011 21:55:40 +1100 Subject: Bug #3197952. Ensure that diffs of diffs style correctly. When header '---' is removed it prepends a '-' removal character resulting in '----' at line start. This is better treated as a removal than as a header. From Todd Whiteman at ActiveState. --- lexers/LexOthers.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lexers/LexOthers.cxx b/lexers/LexOthers.cxx index c7b575b94..2062b1b18 100644 --- a/lexers/LexOthers.cxx +++ b/lexers/LexOthers.cxx @@ -509,7 +509,7 @@ static void ColouriseDiffLine(char *lineBuffer, int endLine, Accessor &styler) { styler.ColourTo(endLine, SCE_DIFF_COMMAND); } else if (0 == strncmp(lineBuffer, "Index: ", 7)) { // For subversion's diff styler.ColourTo(endLine, SCE_DIFF_COMMAND); - } else if (0 == strncmp(lineBuffer, "---", 3)) { + } else if (0 == strncmp(lineBuffer, "---", 3) && lineBuffer[3] != '-') { // In a context diff, --- appears in both the header and the position markers if (lineBuffer[3] == ' ' && atoi(lineBuffer + 4) && !strchr(lineBuffer, '/')) styler.ColourTo(endLine, SCE_DIFF_POSITION); -- cgit v1.2.3