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 --- test/functional/legacy/options_spec.lua | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'test/functional') 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) -- cgit