diff options
| author | nyamatongwe <devnull@localhost> | 2002-03-26 00:56:20 +0000 | 
|---|---|---|
| committer | nyamatongwe <devnull@localhost> | 2002-03-26 00:56:20 +0000 | 
| commit | 91c22c59aa9d2e027ef9718e265c687689be1efd (patch) | |
| tree | 745445917070e1298a19e9f80f9b9376f7d8c7ba /src/LexOthers.cxx | |
| parent | ec1a435f16ffdabaa8325725f16fbfd783d11478 (diff) | |
| download | scintilla-mirror-91c22c59aa9d2e027ef9718e265c687689be1efd.tar.gz | |
Made symbols for the lexical states of the diff lexer. Recognise '***' as the same as '+++' rather than like '!'.
Diffstat (limited to 'src/LexOthers.cxx')
| -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);  	}  } | 
