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.

This commit is contained in:
Kovid Goyal 2018-03-09 21:03:42 +05:30
parent 8ca9348b07
commit fd9dac4ca4
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -414,7 +414,9 @@ class Boss:
def edit_config_file(self, *a): def edit_config_file(self, *a):
confpath = prepare_config_file_for_editing() 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) self.new_os_window(*cmd)
def input_unicode_character(self): def input_unicode_character(self):