mirror of
https://github.com/mawww/kakoune.git
synced 2024-11-25 21:16:38 +03:00
Merge remote-tracking branch 'krobelus/git-blame-toggle'
This commit is contained in:
commit
a500d27ef1
@ -62,13 +62,12 @@ define-command -params 1.. \
|
||||
Available commands:
|
||||
add
|
||||
apply (alias for "patch git apply")
|
||||
blame
|
||||
blame (toggle blame annotations)
|
||||
checkout
|
||||
commit
|
||||
diff
|
||||
edit
|
||||
grep
|
||||
hide-blame
|
||||
hide-diff
|
||||
init
|
||||
log
|
||||
@ -91,7 +90,6 @@ define-command -params 1.. \
|
||||
diff \
|
||||
edit \
|
||||
grep \
|
||||
hide-blame \
|
||||
hide-diff \
|
||||
init \
|
||||
log \
|
||||
@ -153,7 +151,18 @@ define-command -params 1.. \
|
||||
}"
|
||||
}
|
||||
|
||||
hide_blame() {
|
||||
printf %s "
|
||||
set-option buffer=$kak_bufname git_blame_flags $kak_timestamp
|
||||
remove-highlighter window/git-blame
|
||||
"
|
||||
}
|
||||
|
||||
run_git_blame() {
|
||||
if [ "${kak_opt_git_blame_flags#* *}" != "${kak_opt_git_blame_flags}" ]; then
|
||||
hide_blame
|
||||
exit
|
||||
fi
|
||||
(
|
||||
cd_bufdir
|
||||
printf %s "evaluate-commands -client '$kak_client' %{
|
||||
@ -365,10 +374,7 @@ define-command -params 1.. \
|
||||
run_git_blame "$@"
|
||||
;;
|
||||
hide-blame)
|
||||
printf %s "try %{
|
||||
set-option buffer=$kak_bufname git_blame_flags $kak_timestamp
|
||||
remove-highlighter window/git-blame
|
||||
}"
|
||||
hide_blame
|
||||
;;
|
||||
show-diff)
|
||||
echo 'try %{ add-highlighter window/git-diff flag-lines Default git_diff_flags }'
|
||||
|
Loading…
Reference in New Issue
Block a user