summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobby Russell <robby@planetargon.com>2015-02-22 09:17:17 -0800
committerRobby Russell <robby@planetargon.com>2015-02-22 09:17:17 -0800
commit7b71dccbaff4a9bb72fc069407723d2ecb7c0eae (patch)
tree43e293e88037806c556ea74d5587ee390684f1fc
parentefd6d4d5930a0f407f1107dc7d864e5c67a0cac6 (diff)
parentd7837c6041b1099982e3f278b50e8868b8b30ff9 (diff)
downloadzsh-7b71dccbaff4a9bb72fc069407723d2ecb7c0eae.tar.gz
zsh-7b71dccbaff4a9bb72fc069407723d2ecb7c0eae.tar.bz2
zsh-7b71dccbaff4a9bb72fc069407723d2ecb7c0eae.zip
Merge pull request #3610 from bderrly/zle-active-check
Verify zle is active before trying to reset-prompt.
-rw-r--r--plugins/vi-mode/vi-mode.plugin.zsh5
1 files changed, 1 insertions, 4 deletions
diff --git a/plugins/vi-mode/vi-mode.plugin.zsh b/plugins/vi-mode/vi-mode.plugin.zsh
index 1de8bf91a..4424bb29a 100644
--- a/plugins/vi-mode/vi-mode.plugin.zsh
+++ b/plugins/vi-mode/vi-mode.plugin.zsh
@@ -16,10 +16,7 @@ function zle-keymap-select zle-line-init zle-line-finish {
# Ensure that the prompt is redrawn when the terminal size changes.
TRAPWINCH() {
- if [[ -o zle ]]; then
- zle reset-prompt
- zle -R
- fi
+ zle && { zle reset-prompt; zle -R }
}
zle -N zle-line-init