mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
fix(api): nvim_set_hl bail out on invalid group name (#20021)
This commit is contained in:
@@ -354,4 +354,9 @@ describe("API: set highlight", function()
|
||||
meths.set_hl(0, 'Normal', {fg='#000083', bg='#0000F3'})
|
||||
eq({foreground = 131, background = 243}, nvim("get_hl_by_name", 'Normal', true))
|
||||
end)
|
||||
|
||||
it('does not segfault on invalid group name #20009', function()
|
||||
eq('Invalid highlight name: foo bar', pcall_err(meths.set_hl, 0, 'foo bar', {bold = true}))
|
||||
assert_alive()
|
||||
end)
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user