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)
746670604a
This commit is contained in:
Jan Edmund Lazo
2021-03-01 23:01:09 -05:00
parent a5bacdbfb4
commit f32acc70e8
6 changed files with 66 additions and 5 deletions

View File

@@ -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)