From df137695bbe2f5bfac4b65cabffd3750cc7e18af Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Mon, 30 Nov 2020 20:01:33 +0100 Subject: [PATCH] Disable WINCH handler in reflowing terminals Fixes #7491. --- share/functions/__fish_config_interactive.fish | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/share/functions/__fish_config_interactive.fish b/share/functions/__fish_config_interactive.fish index c12fe6c61..223de55a1 100644 --- a/share/functions/__fish_config_interactive.fish +++ b/share/functions/__fish_config_interactive.fish @@ -242,6 +242,11 @@ function __fish_config_interactive -d "Initializations that should be performed end function __fish_winch_handler --on-signal WINCH -d "Repaint screen when window changes size" + # VTE and iTerm reflow the text themselves, so us doing it inevitably races against them. + # Guidance from the VTE developers is to let them repaint. + if set -q VTE_VERSION; or test "$TERM_PROGRAM" = "iTerm.app" + return + end commandline -f repaint >/dev/null 2>/dev/null end