From 37f16244d7aaee08d947e2ba185fc4fac7579940 Mon Sep 17 00:00:00 2001 From: James Whitehead II Date: Thu, 14 Oct 2010 16:09:21 +0100 Subject: [PATCH] Ensure deletion actually deletes correct binding --- Clique.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Clique.lua b/Clique.lua index 0e68db1..d952afc 100755 --- a/Clique.lua +++ b/Clique.lua @@ -400,16 +400,17 @@ end local function bindingeq(a, b) assert(type(a) == "table", "Error during deletion comparison") assert(type(b) == "table", "Error during deletion comparison") + if a.type ~= b.type then return false elseif a.type == "target" then - return true + return a.key == b.key elseif a.type == "menu" then - return true + return a.key == b.key elseif a.type == "spell" then - return a.spell == b.spell + return a.spell == b.spell and a.key == b.key elseif a.type == "macro" then - return a.macrotext == b.macrotext + return a.macrotext == b.macrotext and a.key == b.key end return false -- 1.7.9.5