fix: change ctags symbols browser key binding from ctrl-k to alt-Q (#387)

The key is already bound to push-line, however the zle widget
has also two other keys, ctrl-q and Alt-q, so no problem, as
IMO users who want that widget already use Alt-q, not Alt-Q.

Closes #386
This commit is contained in:
Sebastian Gniazdowski 2022-10-03 10:09:54 +00:00 committed by GitHub
parent 65331c222d
commit 7f6dc7da6c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 5 deletions

View file

@ -381,8 +381,10 @@ if [[ $__tfind_spe_call_count -eq 1 ]]; then
zle -A $pup_widget saved-$pup_widget
zle -N $pdown_widget _tfind_simulate_widget
zle -N $pup_widget _tfind_simulate_widget
zle -A zle-line-pre-redraw saved-pre-redraw
zle -D zle-line-pre-redraw
if (( $+widgets[zle-line-pre-redraw] )); then
zle -A zle-line-pre-redraw saved-pre-redraw
zle -D zle-line-pre-redraw
fi
local selected_editor cd_at_edit tagtext tagline taglinebyte tagfile
local -a comm
comm=()
@ -457,8 +459,11 @@ if [[ $__tfind_spe_call_count -eq 1 ]]; then
zle -A saved-$pup_widget $pup_widget
zle -D saved-$pdown_widget saved-$pup_widget
zle -A saved-pre-redraw zle-line-pre-redraw
zle -D saved-pre-redraw
if (( $+widgets[saved-pre-redraw] )); then
zle -A saved-pre-redraw zle-line-pre-redraw
zle -D saved-pre-redraw
fi
# Full reinitialisation at next call
__tfind_spe_call_count=0

View file

@ -3265,6 +3265,7 @@ zle -N zi-browse-symbol
zle -N zi-browse-symbol-backwards zi-browse-symbol
zle -N zi-browse-symbol-pbackwards zi-browse-symbol
zle -N zi-browse-symbol-pforwards zi-browse-symbol
bindkey "^K" zi-browse-symbol
zstyle -s ':zinit:browse-symbol' key ZINIT_TMP || ZINIT_TMP='\eQ'
[[ -n $ZINIT_TMP ]] && bindkey $ZINIT_TMP zi-browse-symbol
# vim:ft=zsh:sw=4:sts=4:et:foldmarker=[[[,]]]:foldmethod=marker