From 1c0ef3256564d42c3dc20c1f776833af1e50731f Mon Sep 17 00:00:00 2001 From: Yann Rouillard Date: Mon, 6 Jun 2022 23:08:46 +0200 Subject: [PATCH] fix seal plugins cmd being ignored in commands table 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. --- Source/Seal.spoon/init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Seal.spoon/init.lua b/Source/Seal.spoon/init.lua index c520d756..30813ba1 100644 --- a/Source/Seal.spoon/init.lua +++ b/Source/Seal.spoon/init.lua @@ -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