diff --git a/src/rc/git-tools.kak b/src/rc/git-tools.kak index 1efc1775..f7a03023 100644 --- a/src/rc/git-tools.kak +++ b/src/rc/git-tools.kak @@ -5,17 +5,17 @@ def git-diff-update-buffer %{ %sh{ removed_lines="" git diff -U0 $kak_bufname | { line=0 - flags="0:red:." + flags="0|red|." while read; do if [[ $REPLY =~ ^---.* ]]; then continue elif [[ $REPLY =~ ^@@.-[0-9]+(,[0-9]+)?.\+([0-9]+)(,[0-9]+)?.@@.* ]]; then line=${BASH_REMATCH[2]} elif [[ $REPLY =~ ^\+ ]]; then - flags="$flags,$line:green:+" + flags="$flags;$line|green|+" ((line++)) elif [[ $REPLY =~ ^\- ]]; then - flags="$flags,$line:red:-" + flags="$flags;$line|red|-" fi done echo "setb git_diff_flags '$flags'"