Skip to content

Commit 33ec630

Browse files
authored
fix: Handle winborder:get return correctly (#165)
1 parent 5d8b1be commit 33ec630

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lua/crates/popup/common.lua

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,12 @@ local function popup_border()
175175
if state.cfg.popup.border ~= nil then
176176
return state.cfg.popup.border
177177
elseif vim.version.ge(vim.version(), {0, 11, 0}) then
178-
return vim.opt_global.winborder:get()
178+
---@type string[]
179+
local winborder = vim.opt_global.winborder:get()
180+
181+
-- This returns { "<value>" } if something like "single" or "rounded"
182+
-- is set, or a list of border chars.
183+
return #winborder == 1 and winborder[1] or winborder
179184
else
180185
return "none"
181186
end

0 commit comments

Comments
 (0)