From 49de2b91c4693a8c9673749c9ad08e6dd3051b73 Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Sat, 5 Feb 2022 19:34:49 +0100 Subject: [PATCH] rc diff: bind diff-jump in all filetype=diff buffers, not just *.diff or *.patch files Mapping in the filetype hook matches others like grep.kak and man.kak. Since we map in buffer scope, git diff buffers will override diff-jump with git-diff-goto-source. This means that the diff-jump binding applies here: diff -u "$1" "$2" | kak -e 'set buffer filetype diff' Reported in: https://github.com/mawww/kakoune/issues/153#issuecomment-1030643854 --- rc/filetype/diff.kak | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rc/filetype/diff.kak b/rc/filetype/diff.kak index 35825a6c..96aeb426 100644 --- a/rc/filetype/diff.kak +++ b/rc/filetype/diff.kak @@ -1,10 +1,10 @@ hook global BufCreate .*\.(diff|patch) %{ set-option buffer filetype diff - map buffer normal %{: diff-jump} } hook global WinSetOption filetype=diff %{ require-module diff + map buffer normal %{: diff-jump} } hook -group diff-highlight global WinSetOption filetype=diff %{