Mercurial > vim
diff 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 |
line wrap: on
line diff
--- a/src/testdir/test_window_cmd.vim +++ b/src/testdir/test_window_cmd.vim @@ -1789,4 +1789,34 @@ function Test_nosplitscroll_cmdwin_curso %bwipeout! set splitscroll& endfunction + +" No scroll when aucmd_win is opened. +function Test_nosplitscroll_aucmdwin() + set nosplitscroll + + call setline(1, range(1, &lines)) + norm Gzz + let top = line('w0') + call setbufvar(bufnr("test", 1) , '&buftype', 'nofile') + call assert_equal(top, line('w0')) + + %bwipeout! + set splitscroll& +endfunc + +" No scroll when help is closed and buffer line count < window height. +function Test_nosplitscroll_helpwin() + set nosplitscroll + set splitbelow + + call setline(1, range(&lines - 10)) + norm G + let top = line('w0') + help | quit + call assert_equal(top, line('w0')) + + set splitbelow& + set splitscroll& +endfunc + " vim: shiftwidth=2 sts=2 expandtab