From 9f1ffc64f1cc9b82ee38b5a947033aa77e16e178 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Fri, 31 Aug 2018 21:18:18 +0200 Subject: [PATCH] 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 --- plugins/vi-mode/vi-mode.plugin.zsh | 3 +-- 1 file changed, 1 insertion(+), 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