From dcc054a785771e6c319e8e2a20c866cc174f33bd Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Thu, 11 Apr 2013 22:41:43 +0200 Subject: [PATCH] git-tools: fix git-diff-show --- src/rc/git-tools.kak | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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'"