aboutsummaryrefslogtreecommitdiff
path: root/test/functional/legacy/options_spec.lua
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 /test/functional/legacy/options_spec.lua
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 'test/functional/legacy/options_spec.lua')
-rw-r--r--test/functional/legacy/options_spec.lua28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/functional/legacy/options_spec.lua b/test/functional/legacy/options_spec.lua
index 598674dbeb..d7f5df3a1e 100644
--- a/test/functional/legacy/options_spec.lua
+++ b/test/functional/legacy/options_spec.lua
@@ -41,4 +41,32 @@ describe('set', function()
]])
matches('E36: Not enough room', exc_exec('set wmh=1'))
end)
+
+ it('scroll works', function()
+ local screen = Screen.new(42, 16)
+ screen:attach()
+ source([[
+ set scroll=2
+ set laststatus=2
+ ]])
+ command('verbose set scroll?')
+ screen:expect([[
+ |
+ ~ |
+ ~ |
+ ~ |
+ ~ |
+ ~ |
+ ~ |
+ ~ |
+ ~ |
+ ~ |
+ ~ |
+ ~ |
+ |
+ scroll=7 |
+ Last set from changed window size |
+ Press ENTER or type command to continue^ |
+ ]])
+ end)
end)