summaryrefslogtreecommitdiff
path: root/plugins/vi-mode/vi-mode.plugin.zsh
diff options
context:
space:
mode:
authorMarc Cornellà <marc.cornella@live.com>2018-08-31 21:18:18 +0200
committerGitHub <noreply@github.com>2018-08-31 21:18:18 +0200
commit9f1ffc64f1cc9b82ee38b5a947033aa77e16e178 (patch)
tree33d7d5f5c3f391d9a902063083f80c758219dc1e /plugins/vi-mode/vi-mode.plugin.zsh
parentdc8811f81779d0e06ac2cd1372a586576e2c8aef (diff)
downloadzsh-9f1ffc64f1cc9b82ee38b5a947033aa77e16e178.tar.gz
zsh-9f1ffc64f1cc9b82ee38b5a947033aa77e16e178.tar.bz2
zsh-9f1ffc64f1cc9b82ee38b5a947033aa77e16e178.zip
vi-mode: reset-prompt if zle is active (TRAPWINCH)
Fixes zle errors when resizing: TRAPWINCH:zle: widgets can only be called when ZLE is active
Diffstat (limited to 'plugins/vi-mode/vi-mode.plugin.zsh')
-rw-r--r--plugins/vi-mode/vi-mode.plugin.zsh3
1 files changed, 1 insertions, 2 deletions
diff --git a/plugins/vi-mode/vi-mode.plugin.zsh b/plugins/vi-mode/vi-mode.plugin.zsh
index a1889d451..6cadd166a 100644
--- a/plugins/vi-mode/vi-mode.plugin.zsh
+++ b/plugins/vi-mode/vi-mode.plugin.zsh
@@ -11,8 +11,7 @@ function zle-line-init() {
# Ensure that the prompt is redrawn when the terminal size changes.
TRAPWINCH() {
- zle && zle -R
- zle reset-prompt
+ zle && { zle -R; zle reset-prompt }
}
zle -N zle-keymap-select