fix number check for the screen argument

The check was not done for the elseif case, and caused a comparison
runtime error.
This commit is contained in:
Abdo Roig-Maranges 2016-03-29 17:03:07 +02:00
parent 995361449a
commit af7495de5a
1 changed files with 3 additions and 1 deletions

View File

@ -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