mirror of
https://github.com/neovim/neovim.git
synced 2026-04-19 14:00:49 +00:00
fix(vim.opt): Fix #14828 with empty values being incorrectly inserted
This commit is contained in:
@@ -414,6 +414,12 @@ local convert_value_to_lua = (function()
|
||||
return value
|
||||
end
|
||||
|
||||
-- Empty strings mean that there is nothing there,
|
||||
-- so empty table should be returned.
|
||||
if value == '' then
|
||||
return {}
|
||||
end
|
||||
|
||||
-- Handles unescaped commas in a list.
|
||||
if string.find(value, ",,,") then
|
||||
local comma_split = vim.split(value, ",,,")
|
||||
@@ -451,6 +457,12 @@ local convert_value_to_lua = (function()
|
||||
[OptionTypes.SET] = function(info, value)
|
||||
if type(value) == "table" then return value end
|
||||
|
||||
-- Empty strings mean that there is nothing there,
|
||||
-- so empty table should be returned.
|
||||
if value == '' then
|
||||
return {}
|
||||
end
|
||||
|
||||
assert(info.flaglist, "That is the only one I know how to handle")
|
||||
|
||||
if info.flaglist and info.commalist then
|
||||
|
||||
Reference in New Issue
Block a user