fix(vim.opt): Fix #14668 Now correctly handles unescaped commas in isfname style

This commit is contained in:
TJ DeVries
2021-06-11 13:39:59 -04:00
parent 9119ea1bec
commit 6ecec87c09
3 changed files with 59 additions and 2 deletions

View File

@@ -1731,6 +1731,26 @@ describe('lua stdlib', function()
]]))
end)
end)
-- isfname=a,b,c,,,d,e,f
it('can handle isfname ,,,', function()
local result = exec_lua [[
vim.opt.isfname = "a,b,,,c"
return { vim.opt.isfname:get(), vim.api.nvim_get_option('isfname') }
]]
eq({{",", "a", "b", "c"}, "a,b,,,c"}, result)
end)
-- isfname=a,b,c,^,,def
it('can handle isfname ,^,,', function()
local result = exec_lua [[
vim.opt.isfname = "a,b,^,,c"
return { vim.opt.isfname:get(), vim.api.nvim_get_option('isfname') }
]]
eq({{"^,", "a", "b", "c"}, "a,b,^,,c"}, result)
end)
end) -- vim.opt
it('vim.cmd', function()