From 5cd8c7e540c91b575581c7958ec82903bb646058 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Mon, 30 Dec 2013 11:33:09 +0100 Subject: [PATCH] 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 --- lib/awful/tag.lua.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/awful/tag.lua.in b/lib/awful/tag.lua.in index 97a42470..c9db9d87 100644 --- a/lib/awful/tag.lua.in +++ b/lib/awful/tag.lua.in @@ -467,7 +467,8 @@ end -- @param tags A table with tags to view only. -- @param screen Optional screen number of the tags. 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 if not util.table.hasitem(tags, _tag) then _tag.selected = false