diff options
| author | Johannes Altmanninger <aclopte@gmail.com> | 2025-03-24 01:35:32 +0100 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2025-03-25 08:11:08 +1100 |
| commit | 1c50bcd8943e104081090ee1cbaf6e367d75ca4e (patch) | |
| tree | 0b107f84e41d949deaad0914774ef586f81b36ef | |
| parent | f1ce997cc4175ffc00e6f789e8a92c8afe4d811a (diff) | |
rc git: clarify reason for NormalIdle hook
When blame and blame-jump invoke "git show" they set a BufCloseFifo hook to
display a statusline message and center the viewport.
As mentioned in the previous patch (which fixed a copy-paste error), the
statusline message does not need a NormalIdle hook. Move it to prevent
such errors.
| -rw-r--r-- | rc/tools/git.kak | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/rc/tools/git.kak b/rc/tools/git.kak index 59d1b080..0d334625 100644 --- a/rc/tools/git.kak +++ b/rc/tools/git.kak @@ -287,10 +287,8 @@ define-command -params 1.. \ evaluate-commands -client ${kak_client} %{ set-option buffer git_blob $(kakquote "$commit:$file_absolute") git blame $(for arg; do kakquote "$arg"; printf " "; done) - hook -once window NormalIdle .* %{ - execute-keys vv - echo -markup -- $(kakquote "{Information}{\\}$message. Press <ret> to jump to blamed commit") - } + echo -markup -- $(kakquote "{Information}{\\}$message. Press <ret> to jump to blamed commit") + hook -once window NormalIdle .* %{ execute-keys vv } } " show_git_cmd_output show "$commit:$file_relative" exit @@ -754,11 +752,9 @@ define-command -params 1.. \ } END $SQ$SQ print \"execute-keys -client $ENV{client} \${diff_line}g<a-h>$ENV{cursor_column}l;\"; printf \"evaluate-commands -client $ENV{client} $SQ$SQ$SQ$SQ - hook -once window NormalIdle .* $SQ$SQ$SQ$SQ$SQ$SQ$SQ$SQ - execute-keys vv - echo -markup -- %s - $SQ$SQ$SQ$SQ$SQ$SQ$SQ$SQ - $SQ$SQ$SQ$SQ ;\"," . escape(escape(perlquote(escape(escape(quote($info)))))) . "; + echo -markup -- %s + hook -once window NormalIdle .* %%{ execute-keys vv } + $SQ$SQ$SQ$SQ ;\"," . escape(escape(perlquote(escape(quote($info))))) . "; $SQ$SQ $SQ "; |
