aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2011-03-03 21:55:40 +1100
committernyamatongwe <devnull@localhost>2011-03-03 21:55:40 +1100
commit4ff53fe211776606dc43cd32340d08ae300a7197 (patch)
treefa9373c3bd8286f6d8f0c474ea093a8e885a348e
parentb7a1aa5a607fad68f65de0d4426af8f50468f1e0 (diff)
downloadscintilla-mirror-4ff53fe211776606dc43cd32340d08ae300a7197.tar.gz
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.
-rw-r--r--lexers/LexOthers.cxx2
1 files changed, 1 insertions, 1 deletions
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);