File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3365,8 +3365,9 @@ win_new_shellsize(void)
33653365 ui_new_shellsize ();
33663366 if (old_Rows != Rows )
33673367 {
3368- // if 'window' uses the whole screen, keep it using that
3369- if (p_window == old_Rows - 1 || old_Rows == 0 )
3368+ // If 'window' uses the whole screen, keep it using that.
3369+ // Don't change it when set with "-w size" on the command line.
3370+ if (p_window == old_Rows - 1 || (old_Rows == 0 && p_window == 0 ))
33703371 p_window = Rows - 1 ;
33713372 old_Rows = Rows ;
33723373 shell_new_rows (); // update window sizes
Original file line number Diff line number Diff line change @@ -1045,6 +1045,7 @@ endfunc
10451045func Test_w_arg ()
10461046 " Can't catch the output of gvim.
10471047 CheckNotGui
1048+
10481049 call writefile ([" iVim Editor\<Esc> :q!\<CR> " ], ' Xscriptin' , ' b' )
10491050 if RunVim ([], [], ' -s Xscriptin -w Xscriptout' )
10501051 call assert_equal ([" iVim Editor\e :q!\r " ], readfile (' Xscriptout' ))
@@ -1060,6 +1061,14 @@ func Test_w_arg()
10601061 call assert_equal (" Cannot open for script output: \" Xdir\" \n " , m )
10611062 call delete (" Xdir" , ' rf' )
10621063 endif
1064+
1065+ " A number argument sets the 'window' option
1066+ call writefile ([" iwindow \<C-R> =&window\<CR>\<Esc> :wq! Xresult\<CR> " ], ' Xscriptin' , ' b' )
1067+ if RunVim ([], [], ' -s Xscriptin -w 17' )
1068+ call assert_equal ([" window 17" ], readfile (' Xresult' ))
1069+ call delete (' Xresult' )
1070+ endif
1071+ call delete (' Xscriptin' )
10631072endfunc
10641073
10651074" Test for the "-s scriptin" argument
Original file line number Diff line number Diff line change @@ -750,6 +750,8 @@ static char *(features[]) =
750750
751751static int included_patches [] =
752752{ /* Add new patch number below this line */
753+ /**/
754+ 2655 ,
753755/**/
754756 2654 ,
755757/**/
You can’t perform that action at this time.
0 commit comments