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
commita9e99a64ab628e1044cc55d65a712a90af70d7a2 (patch)
tree0f9a13a352796e71f7944aeb2c6f3b9d5c6c2aa8 /lexers/LexDiff.cxx
parent39001aba9a3e181bacb6907da31a8bc8229aebf4 (diff)
downloadscintilla-mirror-a9e99a64ab628e1044cc55d65a712a90af70d7a2.tar.gz
Backport: Add styles for diffs containing patches.
Backport of changeset 7004:a1f932ccdee6.
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] == '>') {