aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authornyamatongwe <unknown>2002-03-26 00:56:20 +0000
committernyamatongwe <unknown>2002-03-26 00:56:20 +0000
commita811ade7d986bfef8d7070ad89314bdf4ab2e605 (patch)
tree745445917070e1298a19e9f80f9b9376f7d8c7ba /src
parenta9a41bd8008b08cf028fe3c4fef01ac9025dfcbb (diff)
downloadscintilla-mirror-a811ade7d986bfef8d7070ad89314bdf4ab2e605.tar.gz
Made symbols for the lexical states of the diff lexer. Recognise '***' as the same as '+++' rather than like '!'.
Diffstat (limited to 'src')
-rw-r--r--src/LexOthers.cxx18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/LexOthers.cxx b/src/LexOthers.cxx
index f188722ff..8a035089c 100644
--- a/src/LexOthers.cxx
+++ b/src/LexOthers.cxx
@@ -159,21 +159,23 @@ static void ColouriseDiffLine(char *lineBuffer, int endLine, Accessor &styler) {
// difference starts then each line starting with ' ' is a whitespace
// otherwise it is considered a comment (Only in..., Binary file...)
if (0 == strncmp(lineBuffer, "diff ", 3)) {
- styler.ColourTo(endLine, 2);
+ styler.ColourTo(endLine, SCE_DIFF_COMMAND);
} else if (0 == strncmp(lineBuffer, "--- ", 3)) {
- styler.ColourTo(endLine, 3);
+ styler.ColourTo(endLine, SCE_DIFF_HEADER);
} else if (0 == strncmp(lineBuffer, "+++ ", 3)) {
- styler.ColourTo(endLine, 3);
+ styler.ColourTo(endLine, SCE_DIFF_HEADER);
+ } else if (0 == strncmp(lineBuffer, "***", 3)) {
+ styler.ColourTo(endLine, SCE_DIFF_HEADER);
} else if (lineBuffer[0] == '@') {
- styler.ColourTo(endLine, 4);
+ styler.ColourTo(endLine, SCE_DIFF_POSITION);
} else if (lineBuffer[0] == '-') {
- styler.ColourTo(endLine, 5);
+ styler.ColourTo(endLine, SCE_DIFF_DELETED);
} else if (lineBuffer[0] == '+') {
- styler.ColourTo(endLine, 6);
+ styler.ColourTo(endLine, SCE_DIFF_ADDED);
} else if (lineBuffer[0] != ' ') {
- styler.ColourTo(endLine, 1);
+ styler.ColourTo(endLine, SCE_DIFF_COMMENT);
} else {
- styler.ColourTo(endLine, 0);
+ styler.ColourTo(endLine, SCE_DIFF_DEFAULT);
}
}