fix(options): properly free string options (#19510)

This commit is contained in:
zeertzjq
2022-07-27 07:26:32 +08:00
committed by GitHub
parent 890d4023cd
commit 79872f3770
4 changed files with 18 additions and 8 deletions

View File

@@ -18,6 +18,7 @@ local run = helpers.run
local pcall_err = helpers.pcall_err
local tbl_contains = global_helpers.tbl_contains
local curbuf, curwin, curtab = helpers.curbuf, helpers.curwin, helpers.curtab
local NIL = helpers.NIL
describe('float window', function()
before_each(function()
@@ -420,6 +421,15 @@ describe('float window', function()
eq(winids, eval('winids'))
end)
it("no segfault when setting minimal style after clearing local 'fillchars' #19510", function()
local float_opts = {relative = 'editor', row = 1, col = 1, width = 1, height = 1}
local float_win = meths.open_win(0, true, float_opts)
meths.win_set_option(float_win, 'fillchars', NIL)
float_opts.style = 'minimal'
meths.win_set_config(float_win, float_opts)
assert_alive()
end)
describe('with only one tabpage,', function()
local float_opts = {relative = 'editor', row = 1, col = 1, width = 1, height = 1}
local old_buf, old_win