From f32acc70e84a3ea4a61e856e4d723ccc433e687c Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Mon, 1 Mar 2021 23:01:09 -0500 Subject: vim-patch:8.2.2236: 'scroll' option can change when setting the statusline Problem: 'scroll' option can change when setting the statusline or tabline but the option context is not updated. Solution: Update the script context when the scroll option is changed as a side effect. (Christian Brabandt, closes vim/vim#7533) https://github.com/vim/vim/commit/746670604a60cb0356b56c112ffb6d297c679099 --- src/nvim/testdir/test_options.vim | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_options.vim b/src/nvim/testdir/test_options.vim index 717a073937..1202b842fd 100644 --- a/src/nvim/testdir/test_options.vim +++ b/src/nvim/testdir/test_options.vim @@ -636,4 +636,23 @@ func Test_isfname_with_options() setlocal keywordprg& endfunc +" Test that resetting laststatus does change scroll option +func Test_opt_reset_scroll() + " See test/functional/legacy/options_spec.lua + CheckRunVimInTerminal + let vimrc =<< trim [CODE] + set scroll=2 + set laststatus=2 + [CODE] + call writefile(vimrc, 'Xscroll') + let buf = RunVimInTerminal('-S Xscroll', {'rows': 16, 'cols': 45}) + call term_sendkeys(buf, ":verbose set scroll?\n") + call WaitForAssert({-> assert_match('Last set.*window size', term_getline(buf, 15))}) + call assert_match('^\s*scroll=7$', term_getline(buf, 14)) + call StopVimInTerminal(buf) + + " clean up + call delete('Xscroll') +endfunc + " vim: shiftwidth=2 sts=2 expandtab -- cgit