From fd9dac4ca45a920b19b2e6d235cc27e282c84d9f Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 9 Mar 2018 21:03:42 +0530 Subject: [PATCH] Add a small delay when opening the editor with the config file to workaround bugs in vim that cause it to ignore SIGWINCH if it happens early during startup. --- kitty/boss.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kitty/boss.py b/kitty/boss.py index fe2044919..95a4361a8 100644 --- a/kitty/boss.py +++ b/kitty/boss.py @@ -414,7 +414,9 @@ class Boss: def edit_config_file(self, *a): confpath = prepare_config_file_for_editing() - cmd = editor + [confpath] + # On macOS vim fails to handle SIGWINCH if it occurs early, so add a + # small delay. + cmd = ['kitty', '+runpy', 'import os, sys, time; time.sleep(0.05); os.execvp(sys.argv[1], sys.argv[1:])'] + editor + [confpath] self.new_os_window(*cmd) def input_unicode_character(self):