mirror of
https://github.com/neovim/neovim.git
synced 2026-02-02 18:14:30 +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:
@@ -1496,7 +1496,7 @@ describe('lua stdlib', function()
|
||||
it('vim.bo', function()
|
||||
eq('', funcs.luaeval "vim.bo.filetype")
|
||||
exec_lua [[
|
||||
vim.api.nvim_set_option_value("filetype", "markdown", {buf = 0})
|
||||
vim.api.nvim_set_option_value("filetype", "markdown", {})
|
||||
BUF = vim.api.nvim_create_buf(false, true)
|
||||
vim.api.nvim_set_option_value("modifiable", false, {buf = BUF})
|
||||
]]
|
||||
@@ -1519,9 +1519,9 @@ describe('lua stdlib', function()
|
||||
|
||||
it('vim.wo', function()
|
||||
exec_lua [[
|
||||
vim.api.nvim_set_option_value("cole", 2, {win=0})
|
||||
vim.api.nvim_set_option_value("cole", 2, {})
|
||||
vim.cmd "split"
|
||||
vim.api.nvim_set_option_value("cole", 2, {win=0})
|
||||
vim.api.nvim_set_option_value("cole", 2, {})
|
||||
]]
|
||||
eq(2, funcs.luaeval "vim.wo.cole")
|
||||
exec_lua [[
|
||||
|
||||
Reference in New Issue
Block a user