46824b39a301087173e0c9af5368333782f9ef9b

Author
Marc Cornellà <marc.cornella@live.com>
Committer
Marc Cornellà <marc.cornella@live.com>
Date

Message

Merge pull request #4191 from apjanke/vi-mode-fix-smkx

vi-mode: fix smkx/rmkx by removing broken line-init/finish widgets 

Diff

 1diff --git a/plugins/vi-mode/vi-mode.plugin.zsh b/plugins/vi-mode/vi-mode.plugin.zsh
 2index 4424bb29af2a5751ba33e5ef604e41aba6bb4bc8..0e2af5dcea8889703cead3d201d3e118c6a1a321 100644
 3--- a/plugins/vi-mode/vi-mode.plugin.zsh
 4+++ b/plugins/vi-mode/vi-mode.plugin.zsh
 5@@ -1,15 +1,5 @@
 6-# Ensures that $terminfo values are valid and updates editor information when
 7-# the keymap changes.
 8-function zle-keymap-select zle-line-init zle-line-finish {
 9-  # The terminal must be in application mode when ZLE is active for $terminfo
10-  # values to be valid.
11-  if (( ${+terminfo[smkx]} )); then
12-    printf '%s' ${terminfo[smkx]}
13-  fi
14-  if (( ${+terminfo[rmkx]} )); then
15-    printf '%s' ${terminfo[rmkx]}
16-  fi
17-
18+# Updates editor information when the keymap changes.
19+function zle-keymap-select() {
20   zle reset-prompt
21   zle -R
22 }
23@@ -19,8 +9,6 @@ TRAPWINCH() {
24   zle && { zle reset-prompt; zle -R }
25 }
26 
27-zle -N zle-line-init
28-zle -N zle-line-finish
29 zle -N zle-keymap-select
30 zle -N edit-command-line
31