Handle single widget arguments to force (#29)

* Handle single widget arguments to force
* update README (force/single-use)
This commit is contained in:
James Reed 2017-02-22 05:14:53 -05:00 committed by mutlusun
parent d9ecb9f20d
commit 043e50322d
2 changed files with 6 additions and 2 deletions

View File

@ -125,10 +125,12 @@ enable caching of values returned by a widget type
**Force update of widgets:**
```Lua
vicious.force({ widget, })
vicious.force(widget)
vicious.force({ widget1, widget2 })
```
widget argument is a table with one or more widgets that will be updated
widget argument is a single widget or a table with one or more widgets that
will be updated
Widget types

View File

@ -234,6 +234,8 @@ function vicious.force(wtable)
for _, w in pairs(wtable) do
update(w, nil, true)
end
else
update(wtable, nil, true)
end
end
-- }}}