diff options
author | bfredl <bjorn.linse@gmail.com> | 2024-02-17 18:42:47 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-17 18:42:47 +0100 |
commit | b12d193b4a68242fb0c7e4f924c8abce3488e1c8 (patch) | |
tree | cd2a63aeaa043f48bd119ed8901c96a3e31f5052 /test | |
parent | 01c15a30c0ab56e14342f9996bea3ad86a68a343 (diff) | |
parent | 2accf2480530c7df2120d8522103f5f1516268cf (diff) | |
download | rneovim-b12d193b4a68242fb0c7e4f924c8abce3488e1c8.tar.gz rneovim-b12d193b4a68242fb0c7e4f924c8abce3488e1c8.tar.bz2 rneovim-b12d193b4a68242fb0c7e4f924c8abce3488e1c8.zip |
Merge pull request #27481 from bfredl/meta_revise
fix(decorations): crash with revised mark with changed decoration flags
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/ui/decorations_spec.lua | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/test/functional/ui/decorations_spec.lua b/test/functional/ui/decorations_spec.lua index 930e4c3f10..9bbae0dae0 100644 --- a/test/functional/ui/decorations_spec.lua +++ b/test/functional/ui/decorations_spec.lua @@ -2371,6 +2371,36 @@ describe('extmark decorations', function() | ]]} end) + + it('can replace marks in place with different decorations #27211', function() + local mark = api.nvim_buf_set_extmark(0, ns, 0, 0, { virt_lines = {{{"foo", "ErrorMsg"}}}, }) + screen:expect{grid=[[ + ^ | + {4:foo} | + {1:~ }|*12 + | + ]]} + + api.nvim_buf_set_extmark(0, ns, 0, 0, { + id = mark, + virt_text = { { "testing", "NonText" } }, + virt_text_pos = "inline", + }) + screen:expect{grid=[[ + {1:^testing} | + {1:~ }|*13 + | + ]]} + + api.nvim_buf_del_extmark(0, ns, mark) + screen:expect{grid=[[ + ^ | + {1:~ }|*13 + | + ]]} + + helpers.assert_alive() + end) end) describe('decorations: inline virtual text', function() |