8247a4097d32a85c6a119b114cce44069559dd3e

Author
Robby Russell <robby@planetargon.com>
Committer
Robby Russell <robby@planetargon.com>
Date

Message

Merge pull request #1320 from jimhester/vi-mode-patch

Fix to restore bindings after switching to vi-mode

Diff

 1diff --git a/plugins/vi-mode/vi-mode.plugin.zsh b/plugins/vi-mode/vi-mode.plugin.zsh
 2index c47ab72114562251e4ca75f1395dcaea1abe2002..d29eb1dda85de0b8aa9416643166c5f4081d468b 100644
 3--- a/plugins/vi-mode/vi-mode.plugin.zsh
 4+++ b/plugins/vi-mode/vi-mode.plugin.zsh
 5@@ -5,7 +5,12 @@ function zle-line-init zle-keymap-select {
 6 zle -N zle-line-init
 7 zle -N zle-keymap-select
 8 
 9+#changing mode clobbers the keybinds, so store the keybinds before and execute 
10+#them after
11+binds=`bindkey -L`
12 bindkey -v
13+for bind in ${(@f)binds}; do eval $bind; done
14+unset binds
15 
16 # if mode indicator wasn't setup by theme, define default
17 if [[ "$MODE_INDICATOR" == "" ]]; then