mirror of
https://github.com/neovim/neovim.git
synced 2026-04-21 14:55:33 +00:00
extmark: fix decoration ploblems with extmark
54ce101 changed the way undo entries are created when adding decorations.
This creates all sorts of problems.This change fixes the problem by
reverting to the previous behavior.
This commit is contained in:
@@ -7,6 +7,7 @@ local meths = helpers.meths
|
||||
local funcs = helpers.funcs
|
||||
local pcall_err = helpers.pcall_err
|
||||
local ok = helpers.ok
|
||||
local assert_alive = helpers.assert_alive
|
||||
|
||||
describe('API: highlight',function()
|
||||
local expected_rgb = {
|
||||
@@ -145,4 +146,15 @@ describe('API: highlight',function()
|
||||
eq({foreground=tonumber("0x888888"), background=tonumber("0x888888")},
|
||||
meths.get_hl_by_name("Shrubbery", true))
|
||||
end)
|
||||
|
||||
it("nvim_buf_add_highlight to other buffer doesn't crash if undo is disabled #12873", function()
|
||||
command('vsplit file')
|
||||
local err, _ = pcall(meths.buf_set_option, 1, 'undofile', false)
|
||||
eq(true, err)
|
||||
err, _ = pcall(meths.buf_set_option, 1, 'undolevels', -1)
|
||||
eq(true, err)
|
||||
err, _ = pcall(meths.buf_add_highlight, 1, -1, 'Question', 0, 0, -1)
|
||||
eq(true, err)
|
||||
assert_alive()
|
||||
end)
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user