Merge pull request #788 from aroig/gh/fix-number-check

Fix number check for the screen argument in movetoscreen
This commit is contained in:
Daniel Hahler 2016-03-29 18:46:49 +02:00
commit 025ba1d524
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