diff --git a/src/MacVim/gui_macvim.m b/src/MacVim/gui_macvim.m index ed658206a8..07e9a1e1c4 100644 --- a/src/MacVim/gui_macvim.m +++ b/src/MacVim/gui_macvim.m @@ -133,6 +133,11 @@ gui_macvim_after_fork_init() && (rows > 4 && rows < 1000 && cols > 29 && cols < 4000)) { gui.num_rows = rows; gui.num_cols = cols; + } else { + // Use the defaults (typically 80x24), if there are no autosaved rows & + // columns. + gui.num_rows = Rows; + gui.num_cols = Columns; } // Check which code path to take for string drawing. diff --git a/src/ui.c b/src/ui.c index 2e18638cf2..d0a26fba38 100644 --- a/src/ui.c +++ b/src/ui.c @@ -310,7 +310,9 @@ ui_get_shellsize() #ifdef FEAT_GUI if (gui.in_use # ifdef FEAT_GUI_MACVIM - || gui.starting /* TODO: Do this check for all GUIs? */ + /* Avoid using terminal dimensions for GUI window. MacVim + * autosaves the dimensions of the first window. */ + || gui.starting # endif ) retval = gui_get_shellsize();