mirror of
https://github.com/neovim/neovim.git
synced 2025-10-26 12:27:24 +00:00
Merge #8329 'API: Make nvim_set_option() update :verbose set …'
This commit is contained in:
@@ -382,6 +382,21 @@ describe('api', function()
|
||||
eq(false, status)
|
||||
ok(err:match('Invalid option name') ~= nil)
|
||||
end)
|
||||
|
||||
it('updates where the option was last set from', function()
|
||||
nvim('set_option', 'equalalways', false)
|
||||
local status, rv = pcall(nvim, 'command_output',
|
||||
'verbose set equalalways?')
|
||||
eq(true, status)
|
||||
ok(nil ~= string.find(rv, 'noequalalways\n'..
|
||||
'\tLast set from API client %(channel id %d+%)'))
|
||||
|
||||
nvim('execute_lua', 'vim.api.nvim_set_option("equalalways", true)', {})
|
||||
status, rv = pcall(nvim, 'command_output',
|
||||
'verbose set equalalways?')
|
||||
eq(true, status)
|
||||
eq(' equalalways\n\tLast set from Lua', rv)
|
||||
end)
|
||||
end)
|
||||
|
||||
describe('nvim_{get,set}_current_buf, nvim_list_bufs', function()
|
||||
|
||||
Reference in New Issue
Block a user