aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2003-01-14 11:12:42 +0000
committernyamatongwe <devnull@localhost>2003-01-14 11:12:42 +0000
commit8ce0a0efb23b3a28e05c072394ad73c11811b639 (patch)
tree185b692a122971eed82448163c4da4025e1f80f0 /src
parent1d47b64abfffba1bfeb30826d10b6034108306fb (diff)
downloadscintilla-mirror-8ce0a0efb23b3a28e05c072394ad73c11811b639.tar.gz
Patch from David Ascher to to support both context diffs and the output
of Python's difflib.
Diffstat (limited to 'src')
-rw-r--r--src/LexOthers.cxx10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/LexOthers.cxx b/src/LexOthers.cxx
index 4e68ca457..be512abbd 100644
--- a/src/LexOthers.cxx
+++ b/src/LexOthers.cxx
@@ -164,13 +164,17 @@ static void ColouriseDiffLine(char *lineBuffer, int endLine, Accessor &styler) {
styler.ColourTo(endLine, SCE_DIFF_HEADER);
} else if (0 == strncmp(lineBuffer, "+++ ", 3)) {
styler.ColourTo(endLine, SCE_DIFF_HEADER);
- } else if (0 == strncmp(lineBuffer, "***", 3)) {
+ } else if (0 == strncmp(lineBuffer, "====", 4)) { // For p4's diff
+ styler.ColourTo(endLine, SCE_DIFF_HEADER);
+ } else if (0 == strncmp(lineBuffer, "***", 3)) {
+ styler.ColourTo(endLine, SCE_DIFF_HEADER);
+ } else if (0 == strncmp(lineBuffer, "? ", 2)) { // For difflib
styler.ColourTo(endLine, SCE_DIFF_HEADER);
} else if (lineBuffer[0] == '@') {
styler.ColourTo(endLine, SCE_DIFF_POSITION);
- } else if (lineBuffer[0] == '-') {
+ } else if (lineBuffer[0] == '-' || lineBuffer[0] == '<') {
styler.ColourTo(endLine, SCE_DIFF_DELETED);
- } else if (lineBuffer[0] == '+') {
+ } else if (lineBuffer[0] == '+' || lineBuffer[0] == '>') {
styler.ColourTo(endLine, SCE_DIFF_ADDED);
} else if (lineBuffer[0] != ' ') {
styler.ColourTo(endLine, SCE_DIFF_COMMENT);