7b71dccbaff4a9bb72fc069407723d2ecb7c0eae

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

Message

Merge pull request #3610 from bderrly/zle-active-check

Verify zle is active before trying to reset-prompt.

Diff

 1diff --git a/plugins/vi-mode/vi-mode.plugin.zsh b/plugins/vi-mode/vi-mode.plugin.zsh
 2index 1de8bf91a9b025a39beed35f3d296826e8d541f5..4424bb29af2a5751ba33e5ef604e41aba6bb4bc8 100644
 3--- a/plugins/vi-mode/vi-mode.plugin.zsh
 4+++ b/plugins/vi-mode/vi-mode.plugin.zsh
 5@@ -16,10 +16,7 @@ function zle-keymap-select zle-line-init zle-line-finish {
 6 
 7 # Ensure that the prompt is redrawn when the terminal size changes.
 8 TRAPWINCH() {
 9-  if [[ -o zle ]]; then
10-    zle reset-prompt
11-    zle -R
12-  fi
13+  zle && { zle reset-prompt; zle -R }
14 }
15 
16 zle -N zle-line-init