Mercurial > vim
diff src/testdir/test_window_cmd.vim @ 30239:91ecee475811 v9.0.0455
patch 9.0.0455: a few problems with 'splitscroll'
Commit: https://github.com/vim/vim/commit/5ed391708a62b4ebaa84dd23e32a416e5c3383d9
Author: Luuk van Baal <luukvbaal@gmail.com>
Date: Tue Sep 13 11:55:10 2022 +0100
patch 9.0.0455: a few problems with 'splitscroll'
Problem: A few problems with 'splitscroll'.
Solution: Fix 'splitscroll' problems. (Luuk van Baal, closes https://github.com/vim/vim/issues/11117)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 13 Sep 2022 13:00:03 +0200 |
parents | bc8ad1c28b51 |
children | 0288baaedf91 |
line wrap: on
line diff
--- a/src/testdir/test_window_cmd.vim +++ b/src/testdir/test_window_cmd.vim @@ -1646,6 +1646,7 @@ func Test_splitscroll_with_splits() for so in [0, 5] for ls in range(0, 2) for pos in ["H", "M", "L"] + tabnew | tabonly! | redraw let tabline = (gui ? 0 : (tab ? 1 : 0)) let winbar_sb = (sb ? winbar : 0) execute 'set scrolloff=' . so @@ -1655,17 +1656,23 @@ func Test_splitscroll_with_splits() execute tab ? 'tabnew' : '' execute winbar ? 'nnoremenu 1.10 WinBar.Test :echo' : '' call setline(1, range(1, 256)) + " No scroll for restore_snapshot + norm G + try + copen | close | colder + catch /E380/ + endtry + call assert_equal(257 - winheight(0), line("w0")) + + " No scroll for firstwin horizontal split execute 'norm gg' . pos - " No scroll for vertical split and quit - vsplit | quit + split | redraw | wincmd k call assert_equal(1, line("w0")) - - " No scroll for horizontal split - split | redraw! | wincmd k - call assert_equal(1, line("w0")) + wincmd j + call assert_equal(win_screenpos(0)[0] - tabline - winbar_sb, line("w0")) " No scroll when resizing windows - resize +2 + wincmd k | resize +2 call assert_equal(1, line("w0")) wincmd j call assert_equal(win_screenpos(0)[0] - tabline - winbar_sb, line("w0")) @@ -1715,7 +1722,7 @@ func Test_splitscroll_with_splits() call assert_equal(1, line("w0")) " No scroll in windows split and quit multiple times - quit | split | split | quit + quit | redraw | split | redraw | split | redraw | quit | redraw call assert_equal(win_screenpos(0)[0] - tabline - winbar_sb, line("w0")) " No scroll for new buffer @@ -1740,11 +1747,9 @@ func Test_splitscroll_with_splits() call assert_equal(6, line("w0")) wincmd j call assert_equal(5 + win_screenpos(0)[0] - tabline - winbar_sb, line("w0")) - only endfor endfor endfor - tabonly! endfor endfor endfor