From af7495de5a6fa9a6d8ecdf768a2f2a699c910cc8 Mon Sep 17 00:00:00 2001 From: Abdo Roig-Maranges Date: Tue, 29 Mar 2016 17:03:07 +0200 Subject: [PATCH] fix number check for the screen argument The check was not done for the elseif case, and caused a comparison runtime error. --- lib/awful/client.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/awful/client.lua b/lib/awful/client.lua index 1593be8a..688e6460 100644 --- a/lib/awful/client.lua +++ b/lib/awful/client.lua @@ -561,7 +561,9 @@ function client.movetoscreen(c, s) if not s then s = sel.screen.index + 1 end - if type(s) == "number" and s > sc then s = 1 elseif s < 1 then s = sc end + if type(s) == "number" then + if s > sc then s = 1 elseif s < 1 then s = sc end + end s = get_screen(s) if get_screen(sel.screen) ~= s then local sel_is_focused = sel == capi.client.focus