diff options
author | nyamatongwe <unknown> | 2002-03-26 00:56:20 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2002-03-26 00:56:20 +0000 |
commit | a811ade7d986bfef8d7070ad89314bdf4ab2e605 (patch) | |
tree | 745445917070e1298a19e9f80f9b9376f7d8c7ba /src | |
parent | a9a41bd8008b08cf028fe3c4fef01ac9025dfcbb (diff) | |
download | scintilla-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.cxx | 18 |
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); } } |