cf03ee6d884b3850775210acb18cfb669cd666fd

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

Message

Merge pull request #1534 from gberenfield/master

Tested fix for Issue #1479

Diff

 1diff --git a/plugins/vi-mode/vi-mode.plugin.zsh b/plugins/vi-mode/vi-mode.plugin.zsh
 2index f91be70e4c5316856b93f7a18134a3e62b66aabc..a06100472a9710b1bc112121239a2b169f898f88 100644
 3--- a/plugins/vi-mode/vi-mode.plugin.zsh
 4+++ b/plugins/vi-mode/vi-mode.plugin.zsh
 5@@ -3,18 +3,13 @@
 6 function zle-keymap-select zle-line-init zle-line-finish {
 7   # The terminal must be in application mode when ZLE is active for $terminfo
 8   # values to be valid.
 9-  if (( $+terminfo[smkx] && $+terminfo[rmkx] )); then
10-    case "$0" in
11-      (zle-line-init)
12-        # Enable terminal application mode.
13-        echoti smkx
14-      ;;
15-      (zle-line-finish)
16-        # Disable terminal application mode.
17-        echoti rmkx
18-      ;;
19-    esac
20+  if (( ${+terminfo[smkx]} )); then
21+    printf '%s' ${terminfo[smkx]}
22   fi
23+  if (( ${+terminfo[rmkx]} )); then
24+    printf '%s' ${terminfo[rmkx]}
25+  fi
26+
27   zle reset-prompt
28   zle -R
29 }