diff options
author | Thomas Bracht Laumann Jespersen <t@laumann.xyz> | 2022-03-15 13:22:13 +0100 |
---|---|---|
committer | Thomas Bracht Laumann Jespersen <t@laumann.xyz> | 2022-03-15 13:22:13 +0100 |
commit | 3676db5c1dfd24c5e136b4998bcd39bbb4a8e947 (patch) | |
tree | 14f4863a3cded84f4294dd83b3654a8aa4b91ee4 /neomutt/hldiff.awk | |
parent | 3293786f88d4d00a88da866a72684aa298c50b6d (diff) |
Diffstat (limited to 'neomutt/hldiff.awk')
-rw-r--r-- | neomutt/hldiff.awk | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/neomutt/hldiff.awk b/neomutt/hldiff.awk index 2f40205..3b68a26 100644 --- a/neomutt/hldiff.awk +++ b/neomutt/hldiff.awk @@ -1,9 +1,10 @@ # vim: set ft=awk : BEGIN { bright = "\033[1m" - add = "\033[33m" # yellow - del = "\033[34m" # blue + add = "\033[32m" # yellow + del = "\033[31m" # blue hunk = "\033[1;36m" # cyan + quote = "\033[0;34m" # magenta? reset = "\033[0m" hit_diff = 0 @@ -22,6 +23,8 @@ BEGIN { gsub(/-+/, del "&" reset, right) gsub(/\++/, add "&" reset, right) print left right + } else if ($0 ~ /^>/) { + print quote $0 reset } else { print $0 } @@ -29,7 +32,9 @@ BEGIN { # Strip carriage returns from line gsub(/\r/, "", $0) - if ($0 ~ /^-/) { + if ($0 ~ /^>/) { + print quote $0 reset + } else if ($0 ~ /^-/) { print del $0 reset } else if ($0 ~ /^\+/) { print add $0 reset |