From ffe4ea47221ded45f7e7c9977a7a17a09b8cb85d Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Sun, 2 Mar 2014 01:05:01 +0000 Subject: [PATCH] git-tools.kak uses $kak_buffile rather than $kak_bufname --- rc/git-tools.kak | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/rc/git-tools.kak b/rc/git-tools.kak index d2031e6c9..8fbb51e62 100644 --- a/rc/git-tools.kak +++ b/rc/git-tools.kak @@ -40,7 +40,7 @@ def -shell-params git %{ %sh{ ( echo "eval -client '$kak_client' %{ try %{ addhl flag_lines magenta git_blame_flags } - set buffer=$kak_bufname git_blame_flags '' + set buffer=$kak_buffile git_blame_flags '' }" | socat -u stdin UNIX-CONNECT:/tmp/kak-${kak_session} declare -A authors declare -A dates @@ -51,9 +51,9 @@ def -shell-params git %{ %sh{ for (( i=1; $i < $count; i++ )); do flag="$flag:$(($line+$i))|black|$text" done - echo "set -add buffer=$kak_bufname git_blame_flags %{${flag}}" | socat -u stdin UNIX-CONNECT:/tmp/kak-${kak_session} + echo "set -add buffer=$kak_buffile git_blame_flags %{${flag}}" | socat -u stdin UNIX-CONNECT:/tmp/kak-${kak_session} } - git blame --incremental $kak_bufname | ( while read blame_line; do + git blame --incremental $kak_buffile | ( while read blame_line; do if [[ $blame_line =~ ([0-9a-f]{40}).([0-9]+).([0-9]+).([0-9]+) ]]; then send_flags sha=${BASH_REMATCH[1]} @@ -69,7 +69,7 @@ def -shell-params git %{ %sh{ } update_diff() { - git diff -U0 $kak_bufname | { + git diff -U0 $kak_buffile | { local line=0 local flags="0|red|." while read; do @@ -97,7 +97,7 @@ def -shell-params git %{ %sh{ ;; update-diff) update_diff ;; add) - name="${2:-${kak_bufname}}" + name="${2:-${kak_buffile}}" if git add -- "${name}"; then echo "echo -color Information 'git: added ${name}'" else