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
master
Marc Cornellà 8 years ago committed by GitHub
parent dc8811f817
commit 9f1ffc64f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      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

Loading…
Cancel
Save