aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2005-06-29 03:27:06 +0000
committernyamatongwe <devnull@localhost>2005-06-29 03:27:06 +0000
commit9c17448550909c4a8a5b755c9f77dc3fcab989ae (patch)
treec94da985df9988d1b9379c73a26d538e4fd73400 /src
parent8d9dcf3e5be8a151ea79b6092c8f9bf1f9a2acb1 (diff)
downloadscintilla-mirror-9c17448550909c4a8a5b755c9f77dc3fcab989ae.tar.gz
In error list lexer, detect lines that start with "+++ " as diff messages
rather than additions.
Diffstat (limited to 'src')
-rw-r--r--src/LexOthers.cxx14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/LexOthers.cxx b/src/LexOthers.cxx
index eef950d76..4ad58495a 100644
--- a/src/LexOthers.cxx
+++ b/src/LexOthers.cxx
@@ -489,11 +489,17 @@ static int RecogniseErrorListLine(const char *lineBuffer, unsigned int lengthLin
} else if (lineBuffer[0] == '!') {
return SCE_ERR_DIFF_CHANGED;
} else if (lineBuffer[0] == '+') {
- return SCE_ERR_DIFF_ADDITION;
- } else if (lineBuffer[0] == '-' && lineBuffer[1] == '-' && lineBuffer[2] == '-') {
- return SCE_ERR_DIFF_MESSAGE;
+ if (strstart(lineBuffer, "+++ ")) {
+ return SCE_ERR_DIFF_MESSAGE;
+ } else {
+ return SCE_ERR_DIFF_ADDITION;
+ }
} else if (lineBuffer[0] == '-') {
- return SCE_ERR_DIFF_DELETION;
+ if (strstart(lineBuffer, "--- ")) {
+ return SCE_ERR_DIFF_MESSAGE;
+ } else {
+ return SCE_ERR_DIFF_DELETION;
+ }
} else if (strstart(lineBuffer, "cf90-")) {
// Absoft Pro Fortran 90/95 v8.2 error and/or warning message
return SCE_ERR_ABSF;