Skip to content

Commit 37468ed

Browse files
committed
fix: Bug when appending option values for an unset option.
(rel. #12)
1 parent c1c55fe commit 37468ed

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lua/winshift/utils.lua

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,10 @@ function M.set_local(winids, option_map, opt)
318318

319319
elseif o.method == "append" then
320320
if is_list_like then
321-
vim.opt_local[fullname] = ("%s%s"):format(cur_value ~= "" and cur_value .. ",", value)
321+
vim.opt_local[fullname] = ("%s%s"):format(
322+
cur_value ~= "" and cur_value .. "," or "",
323+
value
324+
)
322325
else
323326
vim.opt_local[fullname]:append(value)
324327
end

0 commit comments

Comments
 (0)