diff src/term.c @ 24228:1e85e76f9e76 v8.2.2655

patch 8.2.2655: The -w command line argument doesn't work Commit: https://github.com/vim/vim/commit/0a1a6a1aa4004d0e4d64cc375540156b8bd92a87 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Mar 26 14:14:18 2021 +0100 patch 8.2.2655: The -w command line argument doesn't work Problem: The -w command line argument doesn't work. Solution: Don't set 'window' when set with the -w argument. (closes https://github.com/vim/vim/issues/8011)
author Bram Moolenaar <Bram@vim.org>
date Fri, 26 Mar 2021 14:15:03 +0100
parents 9f64c420f280
children 9299d21d1d5d
line wrap: on
line diff
--- a/src/term.c
+++ b/src/term.c
@@ -3365,8 +3365,9 @@ win_new_shellsize(void)
 	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)
+	// 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