API: include invalid buffer/window/tabpage in error message (#11712)

This commit is contained in:
Daniel Hahler
2020-01-14 09:21:10 +01:00
committed by GitHub
parent 9231684986
commit 3d1531aee5
7 changed files with 15 additions and 11 deletions

View File

@@ -47,7 +47,7 @@ describe(':lua command', function()
pcall_err(command, 'lua ()'))
eq([[Vim(lua):E5108: Error executing lua [string ":lua"]:1: TEST]],
exc_exec('lua error("TEST")'))
eq([[Vim(lua):E5108: Error executing lua [string ":lua"]:1: Invalid buffer id]],
eq([[Vim(lua):E5108: Error executing lua [string ":lua"]:1: Invalid buffer id: -10]],
exc_exec('lua vim.api.nvim_buf_set_lines(-10, 1, 1, false, {"TEST"})'))
eq({''}, curbufmeths.get_lines(0, 100, false))
end)