test: textlock api error

This commit is contained in:
notomo 2020-11-24 21:57:43 +09:00
parent 93ba977793
commit 30ef8c693c

View File

@ -47,6 +47,10 @@ describe('eval-API', function()
eq('Vim(call):E5555: API call: Invalid buffer id: 17', err)
end)
it('cannot change texts if textlocked', function()
command("autocmd TextYankPost <buffer> ++once call nvim_buf_set_lines(0, 0, -1, v:false, [])")
eq('Vim(call):E5555: API call: E523: Not allowed here', pcall_err(command, "normal! yy"))
end)
it("use buffer numbers and windows ids as handles", function()
local screen = Screen.new(40, 8)