From 91c22c59aa9d2e027ef9718e265c687689be1efd Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Tue, 26 Mar 2002 00:56:20 +0000 Subject: Made symbols for the lexical states of the diff lexer. Recognise '***' as the same as '+++' rather than like '!'. --- src/LexOthers.cxx | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'src') 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); } } -- cgit v1.2.3