comparison src/testdir/test_window_cmd.vim @ 30300:b9d07900b0b8 v9.0.0486

patch 9.0.0486: text scrolled with 'nosplitscroll', autocmd win and help Commit: https://github.com/vim/vim/commit/d5bc762dea1fd32fa04342f8149f95ccfc3b9709 Author: Luuk van Baal <luukvbaal@gmail.com> Date: Sat Sep 17 16:16:35 2022 +0100 patch 9.0.0486: text scrolled with 'nosplitscroll', autocmd win and help Problem: Text scrolled with 'nosplitscroll', autocmd win opened and help window closed. Solution: Skip win_fix_scroll() in more situations. (Luuk van Baal, closes #11150)
author Bram Moolenaar <Bram@vim.org>
date Sat, 17 Sep 2022 17:30:03 +0200
parents 9edb1a8161ac
children b5f67135fcb6
comparison
equal deleted inserted replaced
30299:5c181bb6c855 30300:b9d07900b0b8
1787 call assert_equal(1, col('.')) 1787 call assert_equal(1, col('.'))
1788 1788
1789 %bwipeout! 1789 %bwipeout!
1790 set splitscroll& 1790 set splitscroll&
1791 endfunction 1791 endfunction
1792
1793 " No scroll when aucmd_win is opened.
1794 function Test_nosplitscroll_aucmdwin()
1795 set nosplitscroll
1796
1797 call setline(1, range(1, &lines))
1798 norm Gzz
1799 let top = line('w0')
1800 call setbufvar(bufnr("test", 1) , '&buftype', 'nofile')
1801 call assert_equal(top, line('w0'))
1802
1803 %bwipeout!
1804 set splitscroll&
1805 endfunc
1806
1807 " No scroll when help is closed and buffer line count < window height.
1808 function Test_nosplitscroll_helpwin()
1809 set nosplitscroll
1810 set splitbelow
1811
1812 call setline(1, range(&lines - 10))
1813 norm G
1814 let top = line('w0')
1815 help | quit
1816 call assert_equal(top, line('w0'))
1817
1818 set splitbelow&
1819 set splitscroll&
1820 endfunc
1821
1792 " vim: shiftwidth=2 sts=2 expandtab 1822 " vim: shiftwidth=2 sts=2 expandtab