fix(statusline): don't leak memory with truncated click labels

This commit is contained in:
zeertzjq
2023-01-18 19:10:58 +08:00
parent 295a264b65
commit 01ddc09747
2 changed files with 13 additions and 0 deletions

View File

@@ -174,6 +174,14 @@ describe('statusline clicks', function()
meths.input_mouse('right', 'press', '', 0, 6, 39)
eq('0 1 r', eval("g:testvar"))
end)
it('no memory leak with truncated click labels', function()
command([[
let &stl = '%@MyClickFunc@foo%X' .. repeat('a', 40) .. '%<t%@Test@bar%X%@Test@baz'
]])
meths.input_mouse('left', 'press', '', 0, 6, 2)
eq('0 1 l', eval("g:testvar"))
end)
end)
describe('global statusline', function()