mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-06-11 15:37:29 +02:00
Avoid 0x0 window when autosaved dimension missing
This fixes a bug where the first window would be tiny if no autosaved dimensions existed on startup.
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user