mirror of
https://github.com/neovim/neovim.git
synced 2026-04-19 14:00:49 +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:
@@ -1401,7 +1401,7 @@ describe('API/extmarks', function()
|
||||
|
||||
it('in read-only buffer', function()
|
||||
command("view! runtime/doc/help.txt")
|
||||
eq(true, meths.get_option_value('ro', {buf=0}))
|
||||
eq(true, meths.get_option_value('ro', {}))
|
||||
local id = set_extmark(ns, 0, 0, 2)
|
||||
eq({{id, 0, 2}}, get_extmarks(ns,0, -1))
|
||||
end)
|
||||
@@ -1474,7 +1474,7 @@ describe('API/extmarks', function()
|
||||
it('in prompt buffer', function()
|
||||
feed('dd')
|
||||
local id = set_extmark(ns, marks[1], 0, 0, {})
|
||||
meths.set_option_value('buftype', 'prompt', {buf = 0})
|
||||
meths.set_option_value('buftype', 'prompt', {})
|
||||
feed('i<esc>')
|
||||
eq({{id, 0, 2}}, get_extmarks(ns, 0, -1))
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user