aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/screen.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/screen.c')
-rw-r--r--src/nvim/screen.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/nvim/screen.c b/src/nvim/screen.c
index 384636f705..0042d8a2a4 100644
--- a/src/nvim/screen.c
+++ b/src/nvim/screen.c
@@ -3154,6 +3154,7 @@ static int win_line(win_T *wp, linenr_T lnum, int startrow, int endrow,
mb_utf8 = false;
}
} else {
+ assert(p_extra != NULL);
c = *p_extra;
mb_c = c;
// If the UTF-8 character is more than one byte:
@@ -7613,8 +7614,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;