From 6d20094c15069d59a5b84e8f2a79dd3f69dd1494 Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage Vallee Date: Mon, 13 Oct 2014 15:00:09 -0400 Subject: [PATCH] awful.tag.update: Fix identical tag set detection If the "current" table is empty, then identical always true. There is a lot of case where this can happen. Mostly when using dynamic tagging. --- lib/awful/tag.lua.in | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/awful/tag.lua.in b/lib/awful/tag.lua.in index 58b0a344a..8ac320d92 100644 --- a/lib/awful/tag.lua.in +++ b/lib/awful/tag.lua.in @@ -178,11 +178,13 @@ function tag.history.update(obj) else if data.history[s].current then -- Check that the list is not identical - local identical = true - for idx, _tag in ipairs(data.history[s].current) do - if curtags[idx] ~= _tag then - identical = false - break + local identical = #data.history[s].current == #curtags + if identical then + for idx, _tag in ipairs(data.history[s].current) do + if curtags[idx] ~= _tag then + identical = false + break + end end end