diff options
| author | Andreas Rönnquist <unknown> | 2018-05-28 14:23:41 +1000 |
|---|---|---|
| committer | Andreas Rönnquist <unknown> | 2018-05-28 14:23:41 +1000 |
| commit | 3af984c23fb51b23894ec741015a3b2eb98a8285 (patch) | |
| tree | 05a3a34d9d496540e671996c63520d93ab23bbb2 /lexers/LexDiff.cxx | |
| parent | eb77cfe43c9376527ed84d904c94a8bc4b683dba (diff) | |
| download | scintilla-mirror-3af984c23fb51b23894ec741015a3b2eb98a8285.tar.gz | |
Add styles for diffs containing patches.
Diffstat (limited to 'lexers/LexDiff.cxx')
| -rw-r--r-- | lexers/LexDiff.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lexers/LexDiff.cxx b/lexers/LexDiff.cxx index f87538daa..dd008c5cb 100644 --- a/lexers/LexDiff.cxx +++ b/lexers/LexDiff.cxx @@ -78,6 +78,14 @@ static void ColouriseDiffLine(char *lineBuffer, Sci_Position endLine, Accessor & styler.ColourTo(endLine, SCE_DIFF_POSITION); } else if (lineBuffer[0] >= '0' && lineBuffer[0] <= '9') { styler.ColourTo(endLine, SCE_DIFF_POSITION); + } else if (0 == strncmp(lineBuffer, "++", 2)) { + styler.ColourTo(endLine, SCE_DIFF_PATCH_ADD); + } else if (0 == strncmp(lineBuffer, "+-", 2)) { + styler.ColourTo(endLine, SCE_DIFF_PATCH_DELETE); + } else if (0 == strncmp(lineBuffer, "-+", 2)) { + styler.ColourTo(endLine, SCE_DIFF_REMOVED_PATCH_ADD); + } else if (0 == strncmp(lineBuffer, "--", 2)) { + styler.ColourTo(endLine, SCE_DIFF_REMOVED_PATCH_DELETE); } else if (lineBuffer[0] == '-' || lineBuffer[0] == '<') { styler.ColourTo(endLine, SCE_DIFF_DELETED); } else if (lineBuffer[0] == '+' || lineBuffer[0] == '>') { |
