From 4c7c9454a36a9dfd5338384f0ca9691790f01c6a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Manuel=20G=C3=B6rlich?= Date: Wed, 4 Dec 2013 13:30:29 +0100 Subject: [PATCH] Count id tokens instead of every single diget --- widgets/imap.lua | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/widgets/imap.lua b/widgets/imap.lua index b3f281d..87a9e61 100644 --- a/widgets/imap.lua +++ b/widgets/imap.lua @@ -61,9 +61,7 @@ local function worker(args) ws = f:read("*all") f:close() - t, mailcount = string.gsub(ws, "%d", "") - t = nil - mailcount = tonumber(mailcount) + _, mailcount = string.gsub(ws, "%d+", "") widget = imap.widget settings() -- 2.39.2