Skip to content

Commit 43898f1

Browse files
committed
fix(component): improve signcolumn handler preference when name is an empty string
1 parent 27c0d50 commit 43898f1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lua/astroui/status/component.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -403,8 +403,9 @@ function M.signcolumn(opts)
403403
callback = function(...)
404404
local args = status_utils.statuscolumn_clickargs(...)
405405
if args.sign then
406-
local name = args.sign.name or args.sign.namespace
407-
local handler = config.sign_handlers[name] or config.sign_handlers[args.sign.texthl]
406+
local handler = args.sign.name ~= "" and config.sign_handlers[args.sign.name]
407+
if not handler then handler = config.sign_handlers[args.sign.namespace] end
408+
if not handler then handler = config.sign_handlers[args.sign.texthl] end
408409
if handler then handler(args) end
409410
end
410411
end,

0 commit comments

Comments
 (0)