fix(api/options): validate buf and win

Fixes #24398
This commit is contained in:
Lewis Russell
2023-07-22 09:52:13 +01:00
committed by GitHub
parent cfcda91827
commit 24e3ee9d07
4 changed files with 33 additions and 37 deletions

View File

@@ -2445,7 +2445,7 @@ describe('API', function()
it('can throw exceptions', function()
local status, err = pcall(nvim, 'get_option_value', 'invalid-option', {})
eq(false, status)
ok(err:match("Invalid 'option': 'invalid%-option'") ~= nil)
ok(err:match("Unknown option 'invalid%-option'") ~= nil)
end)
it('does not truncate error message <1 MB #5984', function()