aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian C. (anrxc) <anrxc@sysphere.org>2013-12-15 18:34:55 +0100
committerAdrian C. (anrxc) <anrxc@sysphere.org>2013-12-15 18:34:55 +0100
commitc51e13c35d042eb34a461015c4f10c693050a6f4 (patch)
tree804e7f51c51fdd97607ce5a4b1bc5cff1d6c636c
parent52cbb64144b3134a0bf131c91fbcf25650a0b219 (diff)
downloadvicious-legacy-c51e13c35d042eb34a461015c4f10c693050a6f4.tar.xz
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.
-rw-r--r--init.lua9
1 files 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