aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/screen.c
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-03-26 18:41:59 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-04-01 07:23:04 -0400
commit3b04ba7544cf78ab4d9e7e9ee4536a2e7a916fe6 (patch)
tree6271476bb40acbde9f26d2c894c8e26d150f773a /src/nvim/screen.c
parenta177820420d3de1614bff01321c0a54a2327fab3 (diff)
downloadrneovim-3b04ba7544cf78ab4d9e7e9ee4536a2e7a916fe6.tar.gz
rneovim-3b04ba7544cf78ab4d9e7e9ee4536a2e7a916fe6.tar.bz2
rneovim-3b04ba7544cf78ab4d9e7e9ee4536a2e7a916fe6.zip
vim-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 vim/vim#8011) https://github.com/vim/vim/commit/0a1a6a1aa4004d0e4d64cc375540156b8bd92a87 Cherry-pick Test_w_arg() from patch v8.2.0509.
Diffstat (limited to 'src/nvim/screen.c')
-rw-r--r--src/nvim/screen.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/nvim/screen.c b/src/nvim/screen.c
index 1e20b77c5c..760a54a316 100644
--- a/src/nvim/screen.c
+++ b/src/nvim/screen.c
@@ -7609,8 +7609,9 @@ void win_new_shellsize(void)
static long old_Columns = 0;
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;