Properly bind ^W – trigger search recomputation

This commit is contained in:
Sebastian Gniazdowski 2016-10-27 18:18:46 +02:00
parent 1a599ee5f0
commit aee52a54ac

View file

@ -196,6 +196,12 @@ _hsmw_cancel_accept() {
zle .accept-line zle .accept-line
} }
_hsmw_backward_kill_word() {
zle .backward-kill-word
__hsmw_hcw_restart="1"
_hsmw_simulate_widget
}
if [ "$__hsmw_hcw_call_count" -eq "1" ]; then if [ "$__hsmw_hcw_call_count" -eq "1" ]; then
# Make the hsmw keymap a copy of the current main # Make the hsmw keymap a copy of the current main
bindkey -N hsmw emacs bindkey -N hsmw emacs
@ -247,7 +253,8 @@ if [ "$__hsmw_hcw_call_count" -eq "1" ]; then
bindkey -M hsmw '^[W' .forward-word bindkey -M hsmw '^[W' .forward-word
bindkey -M hsmw '^K' .kill-whole-line bindkey -M hsmw '^K' .kill-whole-line
bindkey -M hsmw '^U' .kill-whole-line bindkey -M hsmw '^U' .kill-whole-line
bindkey -M hsmw '^W' .backward-kill-word zle -N _hsmw_backward_kill_word
bindkey -M hsmw '^W' _hsmw_backward_kill_word
# Additional keys # Additional keys
bindkey -M hsmw '^P' "$up_widget" bindkey -M hsmw '^P' "$up_widget"