summaryrefslogtreecommitdiff
path: root/plugins/vi-mode
diff options
context:
space:
mode:
authorAndrew Janke <andrew@apjanke.net>2015-07-27 21:21:43 -0400
committerAndrew Janke <andrew@apjanke.net>2015-11-18 06:06:20 -0500
commit8ea773582f4628b1ed7222b95463f835b684478d (patch)
tree65a8fed2c1da79c4196fe9901d34e38ecf12c899 /plugins/vi-mode
parenta207a38d634cc10441636bc4359cd8a18c502dea (diff)
downloadzsh-8ea773582f4628b1ed7222b95463f835b684478d.tar.gz
zsh-8ea773582f4628b1ed7222b95463f835b684478d.tar.bz2
zsh-8ea773582f4628b1ed7222b95463f835b684478d.zip
vi-mode: remove line-init/finish widgets that broken terminfo keybindings
The zle-line-init and zle-line-finish definitions here were broken with respect to smkx/rmkx because their "if" logic had fallthrough where it shouldn't, so the mode was left in rmkx all the time. This just removes those widgets entirely, because they're now defined (correctly) in lib/keybindings.zsh and not needed in plugins.
Diffstat (limited to 'plugins/vi-mode')
-rw-r--r--plugins/vi-mode/vi-mode.plugin.zsh16
1 files changed, 2 insertions, 14 deletions
diff --git a/plugins/vi-mode/vi-mode.plugin.zsh b/plugins/vi-mode/vi-mode.plugin.zsh
index 4424bb29a..0e2af5dce 100644
--- a/plugins/vi-mode/vi-mode.plugin.zsh
+++ b/plugins/vi-mode/vi-mode.plugin.zsh
@@ -1,15 +1,5 @@
-# Ensures that $terminfo values are valid and updates editor information when
-# the keymap changes.
-function zle-keymap-select zle-line-init zle-line-finish {
- # The terminal must be in application mode when ZLE is active for $terminfo
- # values to be valid.
- if (( ${+terminfo[smkx]} )); then
- printf '%s' ${terminfo[smkx]}
- fi
- if (( ${+terminfo[rmkx]} )); then
- printf '%s' ${terminfo[rmkx]}
- fi
-
+# Updates editor information when the keymap changes.
+function zle-keymap-select() {
zle reset-prompt
zle -R
}
@@ -19,8 +9,6 @@ TRAPWINCH() {
zle && { zle reset-prompt; zle -R }
}
-zle -N zle-line-init
-zle -N zle-line-finish
zle -N zle-keymap-select
zle -N edit-command-line