Skip to content

Commit

Permalink
fix seal plugins cmd being ignored in commands table (#271)
Browse files Browse the repository at this point in the history
Seal plugins can define a table of commands which contains
the command used to launch it in the `cmd` field.

However currently the key of the command in the commands table
is used instead of this field.
This was identical for most seal plugin except filesearch which
uses the special ' character as the command trigger.
  • Loading branch information
yannrouillard authored Aug 7, 2024
1 parent b842c24 commit 3bb667e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/Seal.spoon/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -301,9 +301,9 @@ function obj.choicesCallback()
end
query_words = table.concat(query_words, " ")
-- First get any direct command matches
for command,cmdInfo in pairs(obj.commands) do
for _,cmdInfo in pairs(obj.commands) do
cmd_fn = cmdInfo["fn"]
if cmd:lower() == command:lower() then
if cmd:lower() == cmdInfo["cmd"]:lower() then
if (query_words or "") == "" then
query_words = ".*"
end
Expand Down

0 comments on commit 3bb667e

Please sign in to comment.