mirror of
https://github.com/neovim/neovim.git
synced 2026-07-22 00:51:33 +00:00
vim-patch:8.1.0864 Make 'scrolloff' and 'sidescrolloff' options window local (#11854)
Problem: cannot have a local value for 'scrolloff' and 'sidescrolloff'
Author: Bram Moolenar
375e339007
This commit is contained in:
@@ -65,8 +65,6 @@ describe(':set validation', function()
|
||||
should_succeed('regexpengine', 2)
|
||||
should_fail('report', -1, 'E487')
|
||||
should_succeed('report', 0)
|
||||
should_fail('scrolloff', -1, 'E49')
|
||||
should_fail('sidescrolloff', -1, 'E487')
|
||||
should_fail('sidescroll', -1, 'E487')
|
||||
should_fail('cmdwinheight', 0, 'E487')
|
||||
should_fail('updatetime', -1, 'E487')
|
||||
@@ -82,6 +80,22 @@ describe(':set validation', function()
|
||||
meths.set_option('window', -10)
|
||||
eq(23, meths.get_option('window'))
|
||||
eq('', eval("v:errmsg"))
|
||||
|
||||
-- 'scrolloff' and 'sidescrolloff' can have a -1 value when
|
||||
-- set for the current window, but not globally
|
||||
feed_command('setglobal scrolloff=-1')
|
||||
eq('E487', eval("v:errmsg"):match("E%d*"))
|
||||
|
||||
feed_command('setglobal sidescrolloff=-1')
|
||||
eq('E487', eval("v:errmsg"):match("E%d*"))
|
||||
|
||||
feed_command('let v:errmsg=""')
|
||||
|
||||
feed_command('setlocal scrolloff=-1')
|
||||
eq('', eval("v:errmsg"))
|
||||
|
||||
feed_command('setlocal sidescrolloff=-1')
|
||||
eq('', eval("v:errmsg"))
|
||||
end)
|
||||
|
||||
it('set wmh/wh wmw/wiw checks', function()
|
||||
|
||||
Reference in New Issue
Block a user