Skip to content

Commit a560366

Browse files
committed
fix(component): fix signcolumn click handler when no sign
1 parent 694e0a7 commit a560366

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lua/astroui/status/component.lua

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -411,8 +411,12 @@ function M.signcolumn(opts)
411411
name = "sign_click",
412412
callback = function(...)
413413
local args = status_utils.statuscolumn_clickargs(...)
414-
local handler = vim.tbl_get(config, "sign_handlers", vim.tbl_get(args, "sign", "name"))
415-
if handler then handler(args) end
414+
local sign_name = vim.tbl_get(args, "sign", "name")
415+
local handler = sign_name and vim.tbl_get(config, "sign_handlers", sign_name)
416+
if handler then
417+
vim.print(handler)
418+
handler(args)
419+
end
416420
end,
417421
},
418422
}, opts)

0 commit comments

Comments
 (0)