浏览代码

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
Marc Cornellà 6 年之前
父节点
当前提交
9f1ffc64f1
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      plugins/vi-mode/vi-mode.plugin.zsh

+ 1 - 2
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