aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2024-02-15 19:05:01 +0100
committerbfredl <bjorn.linse@gmail.com>2024-02-17 18:22:35 +0100
commit2accf2480530c7df2120d8522103f5f1516268cf (patch)
treecd2a63aeaa043f48bd119ed8901c96a3e31f5052 /test/functional/ui
parent01c15a30c0ab56e14342f9996bea3ad86a68a343 (diff)
downloadrneovim-2accf2480530c7df2120d8522103f5f1516268cf.tar.gz
rneovim-2accf2480530c7df2120d8522103f5f1516268cf.tar.bz2
rneovim-2accf2480530c7df2120d8522103f5f1516268cf.zip
fix(decorations): crash with revised mark with changed decoration flags
fixes #27211
Diffstat (limited to 'test/functional/ui')
-rw-r--r--test/functional/ui/decorations_spec.lua30
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()