@@ -1646,6 +1646,7 @@ func Test_splitscroll_with_splits()
16461646 for so in [0 , 5 ]
16471647 for ls in range (0 , 2 )
16481648 for pos in [" H" , " M" , " L" ]
1649+ tabnew | tabonly ! | redraw
16491650 let tabline = (gui ? 0 : (tab ? 1 : 0 ))
16501651 let winbar_sb = (sb ? winbar : 0 )
16511652 execute ' set scrolloff=' . so
@@ -1655,17 +1656,23 @@ func Test_splitscroll_with_splits()
16551656 execute tab ? ' tabnew' : ' '
16561657 execute winbar ? ' nnoremenu 1.10 WinBar.Test :echo' : ' '
16571658 call setline (1 , range (1 , 256 ))
1659+ " No scroll for restore_snapshot
1660+ norm G
1661+ try
1662+ copen | close | colder
1663+ catch /E380/
1664+ endtry
1665+ call assert_equal (257 - winheight (0 ), line (" w0" ))
1666+
1667+ " No scroll for firstwin horizontal split
16581668 execute ' norm gg' . pos
1659- " No scroll for vertical split and quit
1660- vsplit | quit
1661- call assert_equal (1 , line (" w0" ))
1662-
1663- " No scroll for horizontal split
1664- split | redraw ! | wincmd k
1669+ split | redraw | wincmd k
16651670 call assert_equal (1 , line (" w0" ))
1671+ wincmd j
1672+ call assert_equal (win_screenpos (0 )[0 ] - tabline - winbar_sb, line (" w0" ))
16661673
16671674 " No scroll when resizing windows
1668- resize + 2
1675+ wincmd k | resize + 2
16691676 call assert_equal (1 , line (" w0" ))
16701677 wincmd j
16711678 call assert_equal (win_screenpos (0 )[0 ] - tabline - winbar_sb, line (" w0" ))
@@ -1715,7 +1722,7 @@ func Test_splitscroll_with_splits()
17151722 call assert_equal (1 , line (" w0" ))
17161723
17171724 " No scroll in windows split and quit multiple times
1718- quit | split | split | quit
1725+ quit | redraw | split | redraw | split | redraw | quit | redraw
17191726 call assert_equal (win_screenpos (0 )[0 ] - tabline - winbar_sb, line (" w0" ))
17201727
17211728 " No scroll for new buffer
@@ -1740,11 +1747,9 @@ func Test_splitscroll_with_splits()
17401747 call assert_equal (6 , line (" w0" ))
17411748 wincmd j
17421749 call assert_equal (5 + win_screenpos (0 )[0 ] - tabline - winbar_sb, line (" w0" ))
1743- only
17441750 endfor
17451751 endfor
17461752 endfor
1747- tabonly !
17481753 endfor
17491754 endfor
17501755 endfor
0 commit comments