]> granicus.if.org Git - vim/commitdiff
patch 8.2.4523: when gvim is started maximized the 'window' option isn't set v8.2.4523
authorK.Takata <kentkt@csc.jp>
Mon, 7 Mar 2022 13:31:15 +0000 (13:31 +0000)
committerBram Moolenaar <Bram@vim.org>
Mon, 7 Mar 2022 13:31:15 +0000 (13:31 +0000)
Problem:    When gvim is started maximized the 'window' option isn't set
            properly. (Christian J. Robinson)
Solution:   Check if 'windows' was already set or not. (Ken Takata,
            closes #9904)

src/term.c
src/version.c

index f131ebff886b5494546aeeb652f07fe5a1f1b11a..14a05de6de30107ee5bff4cd8ebcc32e3d2bf3a8 100644 (file)
@@ -3380,7 +3380,8 @@ win_new_shellsize(void)
     {
        // If 'window' uses the whole screen, keep it using that.
        // Don't change it when set with "-w size" on the command line.
-       if (p_window == old_Rows - 1 || (old_Rows == 0 && p_window == 0))
+       if (p_window == old_Rows - 1
+                   || (old_Rows == 0 && !option_was_set((char_u *)"window")))
            p_window = Rows - 1;
        old_Rows = Rows;
        shell_new_rows();       // update window sizes
index aa027a9dd56ab7f811bdb49222cbff72d5276e35..a2f9d297f296f959065e2ce32d180ccd14494b8b 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    4523,
 /**/
     4522,
 /**/