aboutsummaryrefslogtreecommitdiffhomepage
path: root/lexers/LexDiff.cxx
diff options
context:
space:
mode:
authorAndreas Rönnquist <unknown>2018-05-28 14:23:41 +1000
committerAndreas Rönnquist <unknown>2018-05-28 14:23:41 +1000
commit3af984c23fb51b23894ec741015a3b2eb98a8285 (patch)
tree05a3a34d9d496540e671996c63520d93ab23bbb2 /lexers/LexDiff.cxx
parenteb77cfe43c9376527ed84d904c94a8bc4b683dba (diff)
downloadscintilla-mirror-3af984c23fb51b23894ec741015a3b2eb98a8285.tar.gz
Add styles for diffs containing patches.
Diffstat (limited to 'lexers/LexDiff.cxx')
-rw-r--r--lexers/LexDiff.cxx8
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] == '>') {