diff --git a/lib/gears/matcher.lua b/lib/gears/matcher.lua index a0ad4bb48..636eb7aa5 100644 --- a/lib/gears/matcher.lua +++ b/lib/gears/matcher.lua @@ -79,7 +79,13 @@ local matcher = {} -- @see remove_matching_source local function default_matcher(a, b) - return a == b or (type(a) == "string" and a:match(b)) + local result = a == b + if result then return result end + if type(a) == "string" and type(b) == "string" then + result = a:match(b) + if result == '' then result = nil end + end + return result end local function greater_matcher(a, b)