aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/window.c
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-10-30 08:56:38 -0400
committerGitHub <noreply@github.com>2020-10-30 08:56:38 -0400
commit9fee5f14239512aed1096b17e8e755c87b9055d2 (patch)
tree9a4c946b624639b153b4e97fdd1a8755094b52ca /src/nvim/window.c
parent037ffd54dcd8edba6787d93273e6696b7a366ac6 (diff)
parent4e24e31a6b2c45e0bc2ab15059a51092b29ebaf5 (diff)
downloadrneovim-9fee5f14239512aed1096b17e8e755c87b9055d2.tar.gz
rneovim-9fee5f14239512aed1096b17e8e755c87b9055d2.tar.bz2
rneovim-9fee5f14239512aed1096b17e8e755c87b9055d2.zip
Merge pull request #13172 from janlazo/vim-8.2.1910
vim-patch:8.1.{2034,2050},8.2.{131,913,929,1521,1910,1913,1922}
Diffstat (limited to 'src/nvim/window.c')
-rw-r--r--src/nvim/window.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/nvim/window.c b/src/nvim/window.c
index 4931221e7a..96409304ab 100644
--- a/src/nvim/window.c
+++ b/src/nvim/window.c
@@ -4049,7 +4049,7 @@ static void enter_tabpage(tabpage_T *tp, buf_T *old_curbuf, int trigger_enter_au
prevwin = next_prevwin;
last_status(false); // status line may appear or disappear
- (void)win_comp_pos(); // recompute w_winrow for all windows
+ const int row = win_comp_pos(); // recompute w_winrow for all windows
diff_need_scrollbind = true;
/* The tabpage line may have appeared or disappeared, may need to resize
@@ -4060,11 +4060,20 @@ static void enter_tabpage(tabpage_T *tp, buf_T *old_curbuf, int trigger_enter_au
clear_cmdline = true;
}
p_ch = curtab->tp_ch_used;
- if (curtab->tp_old_Rows != Rows || (old_off != firstwin->w_winrow
- ))
+
+ // When cmdheight is changed in a tab page with '<C-w>-', cmdline_row is
+ // changed but p_ch and tp_ch_used are not changed. Thus we also need to
+ // check cmdline_row.
+ if ((row < cmdline_row) && (cmdline_row <= Rows - p_ch)) {
+ clear_cmdline = true;
+ }
+
+ if (curtab->tp_old_Rows != Rows || (old_off != firstwin->w_winrow)) {
shell_new_rows();
- if (curtab->tp_old_Columns != Columns && starting == 0)
- shell_new_columns(); /* update window widths */
+ }
+ if (curtab->tp_old_Columns != Columns && starting == 0) {
+ shell_new_columns(); // update window widths
+ }
lastused_tabpage = old_curtab;