awful.tag.viewmore: Make screen optional (FS#1203)
The documentation says that screen, the last argument to viewmore(), is an optional argument. However, the implementation only treated it as an optional argument in one place. Fix this by always setting the screen variable itself to a screen. Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
aa51379be0
commit
5cd8c7e540
|
@ -467,7 +467,8 @@ end
|
||||||
-- @param tags A table with tags to view only.
|
-- @param tags A table with tags to view only.
|
||||||
-- @param screen Optional screen number of the tags.
|
-- @param screen Optional screen number of the tags.
|
||||||
function tag.viewmore(tags, screen)
|
function tag.viewmore(tags, screen)
|
||||||
local screen_tags = tag.gettags(screen or capi.mouse.screen)
|
local screen = screen or capi.mouse.screen
|
||||||
|
local screen_tags = tag.gettags(screen)
|
||||||
for _, _tag in ipairs(screen_tags) do
|
for _, _tag in ipairs(screen_tags) do
|
||||||
if not util.table.hasitem(tags, _tag) then
|
if not util.table.hasitem(tags, _tag) then
|
||||||
_tag.selected = false
|
_tag.selected = false
|
||||||
|
|
Loading…
Reference in New Issue