mirror of
https://github.com/neovim/neovim.git
synced 2025-09-07 03:48:18 +00:00
Add vim.cmd as an alias for nvim_command (#11446)
This commit is contained in:
@@ -618,4 +618,13 @@ describe('lua stdlib', function()
|
||||
matches("^Error executing lua: .*: Expected lua string$",
|
||||
pcall_err(exec_lua, 'return vim.wo[0][0].list'))
|
||||
end)
|
||||
|
||||
it('vim.cmd', function()
|
||||
exec_lua [[
|
||||
vim.cmd "autocmd BufNew * ++once lua BUF = vim.fn.expand('<abuf>')"
|
||||
vim.cmd "new"
|
||||
]]
|
||||
eq('2', funcs.luaeval "BUF")
|
||||
eq(2, funcs.luaeval "#vim.api.nvim_list_bufs()")
|
||||
end)
|
||||
end)
|
||||
|
Reference in New Issue
Block a user