Workaround for OMZ vi-mode plugin

This commit is contained in:
Sebastian Gniazdowski 2016-10-29 17:40:30 +02:00
parent 2f6393dd0b
commit 25dae1d616

View file

@ -284,6 +284,10 @@ if [ "$__hsmw_hcw_call_count" -eq "1" ]; then
zle -N backward-delete-char _hsmw_backward_delete_char zle -N backward-delete-char _hsmw_backward_delete_char
zle -N delete-char _hsmw_delete_char zle -N delete-char _hsmw_delete_char
# OMZ does funny things with zle-keymap-select
zle -A zle-keymap-select saved-zle-keymap-select
zle -D zle-keymap-select
# Override ourselves with what we actually are # Override ourselves with what we actually are
# because zsh-autosuggestions change us # because zsh-autosuggestions change us
zle -A "$down_widget" saved-"$down_widget" zle -A "$down_widget" saved-"$down_widget"
@ -326,7 +330,8 @@ if [ "$__hsmw_hcw_call_count" -eq "1" ]; then
zle -A saved-self-insert self-insert zle -A saved-self-insert self-insert
zle -A saved-backward-delete-char backward-delete-char zle -A saved-backward-delete-char backward-delete-char
zle -A saved-delete-char delete-char zle -A saved-delete-char delete-char
zle -D saved-self-insert saved-backward-delete-char saved-delete-char zle -A saved-zle-keymap-select zle-keymap-select
zle -D saved-self-insert saved-backward-delete-char saved-delete-char saved-zle-keymap-select
# Restore ourselves # Restore ourselves
zle -A saved-"$down_widget" "$down_widget" zle -A saved-"$down_widget" "$down_widget"