From c51e13c35d042eb34a461015c4f10c693050a6f4 Mon Sep 17 00:00:00 2001 From: "Adrian C. (anrxc)" Date: Sun, 15 Dec 2013 18:34:55 +0100 Subject: init: stop allocating reg table functions with properties This partly reverts commit f1844decefb because a user reported seeing nil passed as the object to the reg.update() function. --- init.lua | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/init.lua b/init.lua index 2d28980..c154e20 100644 --- a/init.lua +++ b/init.lua @@ -152,12 +152,11 @@ function vicious.register(widget, wtype, format, timer, warg) timer = timer, warg = warg, widget = widget, - - -- Update function - update = function () - update(widget, reg) - end, } + -- Set functions + reg.update = function () + update(widget, reg) + end -- Default to 2s timer if reg.timer == nil then -- cgit v1.2.3