diff options
| author | nyamatongwe <unknown> | 2003-01-14 11:12:42 +0000 | 
|---|---|---|
| committer | nyamatongwe <unknown> | 2003-01-14 11:12:42 +0000 | 
| commit | 57634960ce6adbfce37563749bbf22550f984993 (patch) | |
| tree | 185b692a122971eed82448163c4da4025e1f80f0 /src | |
| parent | d09010c561bfec9dd52b467ebfaa17c2ea2e53f4 (diff) | |
| download | scintilla-mirror-57634960ce6adbfce37563749bbf22550f984993.tar.gz | |
Patch from David Ascher to to support both context diffs and the output
of Python's difflib.
Diffstat (limited to 'src')
| -rw-r--r-- | src/LexOthers.cxx | 10 | 
1 files changed, 7 insertions, 3 deletions
| diff --git a/src/LexOthers.cxx b/src/LexOthers.cxx index 4e68ca457..be512abbd 100644 --- a/src/LexOthers.cxx +++ b/src/LexOthers.cxx @@ -164,13 +164,17 @@ static void ColouriseDiffLine(char *lineBuffer, int endLine, Accessor &styler) {  		styler.ColourTo(endLine, SCE_DIFF_HEADER);  	} else if (0 == strncmp(lineBuffer, "+++ ", 3)) {  		styler.ColourTo(endLine, SCE_DIFF_HEADER); -	} else if (0 == strncmp(lineBuffer, "***", 3)) { +	} else if (0 == strncmp(lineBuffer, "====", 4)) {  // For p4's diff +		styler.ColourTo(endLine, SCE_DIFF_HEADER); + 	} else if (0 == strncmp(lineBuffer, "***", 3)) { +		styler.ColourTo(endLine, SCE_DIFF_HEADER); +	} else if (0 == strncmp(lineBuffer, "? ", 2)) {    // For difflib  		styler.ColourTo(endLine, SCE_DIFF_HEADER);  	} else if (lineBuffer[0] == '@') {  		styler.ColourTo(endLine, SCE_DIFF_POSITION); -	} else if (lineBuffer[0] == '-') { +	} else if (lineBuffer[0] == '-' || lineBuffer[0] == '<') {  		styler.ColourTo(endLine, SCE_DIFF_DELETED); -	} else if (lineBuffer[0] == '+') { +	} else if (lineBuffer[0] == '+' || lineBuffer[0] == '>') {  		styler.ColourTo(endLine, SCE_DIFF_ADDED);  	} else if (lineBuffer[0] != ' ') {  		styler.ColourTo(endLine, SCE_DIFF_COMMENT); | 
