aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/decorations_spec.lua
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2024-01-23 09:16:04 +0100
committerbfredl <bjorn.linse@gmail.com>2024-01-23 09:24:36 +0100
commit54225bdb021e64d09f98201bc0a610e2600b6473 (patch)
tree8051a68d4a4f42b04aab2dce6d316a4c421f403b /test/functional/ui/decorations_spec.lua
parentdc466f9a63ede5e2bbddc33688c0c972abfe9a52 (diff)
downloadrneovim-54225bdb021e64d09f98201bc0a610e2600b6473.tar.gz
rneovim-54225bdb021e64d09f98201bc0a610e2600b6473.tar.bz2
rneovim-54225bdb021e64d09f98201bc0a610e2600b6473.zip
fix(extmarks): crash with sign after many marks
fixes #27137
Diffstat (limited to 'test/functional/ui/decorations_spec.lua')
-rw-r--r--test/functional/ui/decorations_spec.lua16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/functional/ui/decorations_spec.lua b/test/functional/ui/decorations_spec.lua
index f133b37e31..1b3d4afd5f 100644
--- a/test/functional/ui/decorations_spec.lua
+++ b/test/functional/ui/decorations_spec.lua
@@ -4548,6 +4548,7 @@ describe('decorations: signs', function()
[1] = {foreground = Screen.colors.Blue4, background = Screen.colors.Grey};
[2] = {foreground = Screen.colors.Blue1, bold = true};
[3] = {background = Screen.colors.Yellow1, foreground = Screen.colors.Blue1};
+ [4] = {foreground = Screen.colors.Gray100, background = Screen.colors.Red};
}
ns = api.nvim_create_namespace 'test'
@@ -5021,6 +5022,21 @@ l5
|
]]}
end)
+
+ it('no crash with sign after many marks #27137', function()
+ screen:try_resize(20, 4)
+ insert('a')
+ for _ = 0, 104 do
+ api.nvim_buf_set_extmark(0, ns, 0, 0, {hl_group = 'Error', end_col = 1})
+ end
+ api.nvim_buf_set_extmark(0, ns, 0, 0, {sign_text = 'S1'})
+
+ screen:expect{grid=[[
+ S1{4:^a} |
+ {2:~ }|*2
+ |
+ ]]}
+ end)
end)
describe('decorations: virt_text', function()