mirror of
https://github.com/neovim/neovim.git
synced 2026-01-25 14:16:04 +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:
@@ -415,7 +415,7 @@ describe('lua: nvim_buf_attach on_bytes', function()
|
||||
|
||||
it('opening lines', function()
|
||||
local check_events = setup_eventcheck(verify, origlines)
|
||||
-- meths.set_option_value('autoindent', true, { buf = 0 })
|
||||
-- meths.set_option_value('autoindent', true, {})
|
||||
feed 'Go'
|
||||
check_events {
|
||||
{ "test1", "bytes", 1, 4, 7, 0, 114, 0, 0, 0, 1, 0, 1 };
|
||||
@@ -428,7 +428,7 @@ describe('lua: nvim_buf_attach on_bytes', function()
|
||||
|
||||
it('opening lines with autoindent', function()
|
||||
local check_events = setup_eventcheck(verify, origlines)
|
||||
meths.set_option_value('autoindent', true, { buf = 0 })
|
||||
meths.set_option_value('autoindent', true, {})
|
||||
feed 'Go'
|
||||
check_events {
|
||||
{ "test1", "bytes", 1, 4, 7, 0, 114, 0, 0, 0, 1, 0, 5 };
|
||||
@@ -462,8 +462,8 @@ describe('lua: nvim_buf_attach on_bytes', function()
|
||||
|
||||
it('continuing comments with fo=or', function()
|
||||
local check_events = setup_eventcheck(verify, {'// Comment'})
|
||||
meths.set_option_value('formatoptions', 'ro', { buf = 0 })
|
||||
meths.set_option_value('filetype', 'c', { buf = 0 })
|
||||
meths.set_option_value('formatoptions', 'ro', {})
|
||||
meths.set_option_value('filetype', 'c', {})
|
||||
feed 'A<CR>'
|
||||
check_events {
|
||||
{ "test1", "bytes", 1, 4, 0, 10, 10, 0, 0, 0, 1, 3, 4 };
|
||||
|
||||
Reference in New Issue
Block a user