To: vim_dev@googlegroups.com Subject: Patch 8.2.2655 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.2655 Problem: The -w command line argument doesn't work. Solution: Don't set 'window' when set with the -w argument. (closes #8011) Files: src/term.c, src/testdir/test_startup.vim *** ../vim-8.2.2654/src/term.c 2021-03-22 16:19:37.529354296 +0100 --- src/term.c 2021-03-26 14:10:52.638845793 +0100 *************** *** 3365,3372 **** ui_new_shellsize(); if (old_Rows != Rows) { ! // if 'window' uses the whole screen, keep it using that ! if (p_window == old_Rows - 1 || old_Rows == 0) p_window = Rows - 1; old_Rows = Rows; shell_new_rows(); // update window sizes --- 3365,3373 ---- ui_new_shellsize(); if (old_Rows != Rows) { ! // 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)) p_window = Rows - 1; old_Rows = Rows; shell_new_rows(); // update window sizes *** ../vim-8.2.2654/src/testdir/test_startup.vim 2021-03-20 22:16:52.961362692 +0100 --- src/testdir/test_startup.vim 2021-03-26 14:10:25.902919011 +0100 *************** *** 1045,1050 **** --- 1045,1051 ---- func Test_w_arg() " Can't catch the output of gvim. CheckNotGui + call writefile(["iVim Editor\:q!\"], 'Xscriptin', 'b') if RunVim([], [], '-s Xscriptin -w Xscriptout') call assert_equal(["iVim Editor\e:q!\r"], readfile('Xscriptout')) *************** *** 1060,1065 **** --- 1061,1074 ---- call assert_equal("Cannot open for script output: \"Xdir\"\n", m) call delete("Xdir", 'rf') endif + + " A number argument sets the 'window' option + call writefile(["iwindow \=&window\\:wq! Xresult\"], 'Xscriptin', 'b') + if RunVim([], [], '-s Xscriptin -w 17') + call assert_equal(["window 17"], readfile('Xresult')) + call delete('Xresult') + endif + call delete('Xscriptin') endfunc " Test for the "-s scriptin" argument *** ../vim-8.2.2654/src/version.c 2021-03-26 13:33:59.556825543 +0100 --- src/version.c 2021-03-26 14:07:29.359402661 +0100 *************** *** 752,753 **** --- 752,755 ---- { /* Add new patch number below this line */ + /**/ + 2655, /**/ -- How To Keep A Healthy Level Of Insanity: 12. Sing along at the opera. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///