aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-03-01 23:01:09 -0500
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-03-02 00:35:52 -0500
commitf32acc70e84a3ea4a61e856e4d723ccc433e687c (patch)
tree0744a8c90289f7a7c98c0c5b242e3cd13b4d50c4 /src/nvim/testdir
parenta5bacdbfb4f10652598d45e339c9f670b477ac8d (diff)
downloadrneovim-f32acc70e84a3ea4a61e856e4d723ccc433e687c.tar.gz
rneovim-f32acc70e84a3ea4a61e856e4d723ccc433e687c.tar.bz2
rneovim-f32acc70e84a3ea4a61e856e4d723ccc433e687c.zip
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
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_options.vim19
1 files changed, 19 insertions, 0 deletions
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