mirror of
https://github.com/neovim/neovim.git
synced 2026-04-20 22:35:33 +00:00
test: don't unnecessarily specify win/buf for nvim_(get|set)_option_value
`nvim_(get|set)_option_value` pick the current buffer / window by default for buffer-local/window-local (but not global-local) options. So specifying `buf = 0` or `win = 0` in opts is unnecessary for those options. This PR removes those to reduce code clutter.
This commit is contained in:
@@ -365,11 +365,11 @@ describe('API/win', function()
|
||||
|
||||
describe('nvim_get_option_value, nvim_set_option_value', function()
|
||||
it('works', function()
|
||||
nvim('set_option_value', 'colorcolumn', '4,3', {win=0})
|
||||
eq('4,3', nvim('get_option_value', 'colorcolumn', {win = 0}))
|
||||
nvim('set_option_value', 'colorcolumn', '4,3', {})
|
||||
eq('4,3', nvim('get_option_value', 'colorcolumn', {}))
|
||||
command("set modified hidden")
|
||||
command("enew") -- edit new buffer, window option is preserved
|
||||
eq('4,3', nvim('get_option_value', 'colorcolumn', {win = 0}))
|
||||
eq('4,3', nvim('get_option_value', 'colorcolumn', {}))
|
||||
|
||||
-- global-local option
|
||||
nvim('set_option_value', 'statusline', 'window-status', {win=0})
|
||||
|
||||
Reference in New Issue
Block a user