Skip to content

Commit

Permalink
fix: match pattern for click handlers
Browse files Browse the repository at this point in the history
I thought the click handlers were already pattern-matched but that wasn't
the case... Previous commit b0d8063 made
the gitsigns clickhandler name less specific which is now matched correctly.
  • Loading branch information
luukvbaal committed Jun 15, 2024
1 parent 2eaca29 commit 8f618bc
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lua/statuscol.lua
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,13 @@ local function get_click_args(minwid, clicks, button, mods)
end

local function call_click_func(name, args)
local handler = cfg.clickhandlers[name] or cfg.clickhandlers[name:match("diagnostic/signs")]
local handler = cfg.clickhandlers[name]
if not handler then
for match in pairs(cfg.clickhandlers) do
handler = cfg.clickhandlers[name:match(match)]
if handler then break end
end
end
if handler then S(function() handler(args) end) end
end

Expand Down

0 comments on commit 8f618bc

Please sign in to comment.