diff options
author | nyamatongwe <unknown> | 2011-03-03 21:55:40 +1100 |
---|---|---|
committer | nyamatongwe <unknown> | 2011-03-03 21:55:40 +1100 |
commit | 93f5462e956c858198f7437fbc90379e30c5506b (patch) | |
tree | 396b8ddc413425685f59be542587a25368b908b5 | |
parent | f67325b4e01ae0c4656927663f9d03c985119e92 (diff) | |
download | scintilla-mirror-93f5462e956c858198f7437fbc90379e30c5506b.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.cxx | 2 |
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); |