Skip to content

Commit 043e503

Browse files
supplantrmutlusun
authored andcommitted
Handle single widget arguments to force (#29)
* Handle single widget arguments to force * update README (force/single-use)
1 parent d9ecb9f commit 043e503

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,12 @@ enable caching of values returned by a widget type
125125
**Force update of widgets:**
126126

127127
```Lua
128-
vicious.force({ widget, })
128+
vicious.force(widget)
129+
vicious.force({ widget1, widget2 })
129130
```
130131

131-
widget argument is a table with one or more widgets that will be updated
132+
widget argument is a single widget or a table with one or more widgets that
133+
will be updated
132134

133135

134136
Widget types

init.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,8 @@ function vicious.force(wtable)
234234
for _, w in pairs(wtable) do
235235
update(w, nil, true)
236236
end
237+
else
238+
update(wtable, nil, true)
237239
end
238240
end
239241
-- }}}

0 commit comments

Comments
 (0)