From ad0e4f993b9571b21e52ca95d9b2e8cfbad4e34c Mon Sep 17 00:00:00 2001 From: Yee Cheng Chin Date: Wed, 26 Dec 2018 19:10:06 +0800 Subject: [PATCH] Fix Vim breaking guioption 'k' initialization for non-GTK Recent Vim change (8.1.0626) broke Vim GUI initialization if guioption 'k' is set, by passing the wrong value to the mustset parameter. Patch around it by making it initialize with the right one in MacVim. --- src/gui.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/gui.c b/src/gui.c index 749dd612db..48e5d823c4 100644 --- a/src/gui.c +++ b/src/gui.c @@ -687,11 +687,17 @@ gui_init(void) gui.shell_created = TRUE; #ifndef FEAT_GUI_GTK +#ifdef FEAT_GUI_MACVIM + // The below code setting gui_set_shellsize breaks guioption-k, so patching + // around it here by passing TRUE to muset. + gui_set_shellsize(TRUE, TRUE, RESIZE_BOTH); +#else // Set the shell size, adjusted for the screen size. For GTK this only // works after the shell has been opened, thus it is further down. // For MS-Windows pass FALSE for "mustset" to make --windowid work. gui_set_shellsize(FALSE, TRUE, RESIZE_BOTH); #endif +#endif #if defined(FEAT_GUI_MOTIF) && defined(FEAT_MENU) /* Need to set the size of the menubar after all the menus have been * created. */