diff --git a/src/testdir/dumps/Test_resize_from_another_tabpage_1.dump b/src/testdir/dumps/Test_resize_from_another_tabpage_1.dump new file mode 100644 index 0000000000..85f6275208 --- /dev/null +++ b/src/testdir/dumps/Test_resize_from_another_tabpage_1.dump @@ -0,0 +1,8 @@ +| +2&#ffffff0|2+2#e000e06&| +2#0000000&|[|N|o| |N|a|m|e|]| | +8#0000001#e0e0e08|[|N|o| |N|a|m|e|]| | +1#0000000#ffffff0@49|X+8#0000001#e0e0e08 +> +0#0000000#ffffff0@19||+1&&| +0&&@53 +|~+0#4040ff13&| @18||+1#0000000&|~+0#4040ff13&| @52 +|~| @18||+1#0000000&|~+0#4040ff13&| @52 +|~| @18||+1#0000000&|~+0#4040ff13&| @52 +|~| @18||+1#0000000&|~+0#4040ff13&| @52 +|<+3#0000000&|N|o| |N|a|m|e|]| |0|,|0|-|1| @1|A|l@1| |[+1&&|N|o| |N|a|m|e|]| @26|0|,|0|-|1| @9|A|l@1 +| +0&&@74 diff --git a/src/testdir/test_window_cmd.vim b/src/testdir/test_window_cmd.vim index c00f60e394..c19d39fbf7 100644 --- a/src/testdir/test_window_cmd.vim +++ b/src/testdir/test_window_cmd.vim @@ -2307,6 +2307,7 @@ endfunc func Test_winfixsize_vsep_statusline() CheckScreendump + let lines =<< trim END set noequalalways splitbelow splitright vsplit @@ -2351,4 +2352,22 @@ func Test_winfixsize_vsep_statusline() call StopVimInTerminal(buf) endfunc +func Test_resize_from_another_tabpage() + CheckScreendump + + let lines =<< trim END + set laststatus=2 + vnew + let w = win_getid() + tabnew + call win_execute(w, 'vertical resize 20') + tabprev + END + call writefile(lines, 'XTestResizeFromAnotherTabpage', 'D') + let buf = RunVimInTerminal('-S XTestResizeFromAnotherTabpage', #{rows: 8}) + call VerifyScreenDump(buf, 'Test_resize_from_another_tabpage_1', {}) + + call StopVimInTerminal(buf) +endfunc + " vim: shiftwidth=2 sts=2 expandtab diff --git a/src/version.c b/src/version.c index 55fe9bc113..bc3c8d4584 100644 --- a/src/version.c +++ b/src/version.c @@ -729,6 +729,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1839, /**/ 1838, /**/ diff --git a/src/window.c b/src/window.c index e2a1eae29e..9a16ad5348 100644 --- a/src/window.c +++ b/src/window.c @@ -4992,7 +4992,7 @@ leave_tabpage( tp->tp_prevwin = prevwin; tp->tp_firstwin = firstwin; tp->tp_lastwin = lastwin; - tp->tp_old_Rows = Rows; + tp->tp_old_Rows = ROWS_AVAIL; if (tp->tp_old_Columns != -1) { tp->tp_old_Columns = topframe->fr_width; @@ -5054,7 +5054,7 @@ enter_tabpage( // The tabpage line may have appeared or disappeared, may need to resize // the frames for that. When the Vim window was resized need to update // frame sizes too. - if (curtab->tp_old_Rows != Rows || (old_off != firstwin->w_winrow + if (curtab->tp_old_Rows != ROWS_AVAIL || (old_off != firstwin->w_winrow #ifdef FEAT_GUI_TABLINE && !gui_use_tabline() #endif