Fix logic in ternary pattern, as cltbl[...] might be nil; closes #6

This commit is contained in:
Stefan Siegel 2015-02-24 03:21:58 +01:00 committed by Emmanuel Lepage Vallee
parent 39cc4465d5
commit 7c4c322b44
1 changed files with 1 additions and 1 deletions

View File

@ -60,7 +60,7 @@ local function display_wiboxes(cltbl,geomtbl,float,swap,c)
init()
end
for k,v in ipairs({"left","right","up","down","center"}) do
local next_clients = (not (float and swap)) and cltbl[util.get_rectangle_in_direction(v , geomtbl, capi.client.focus:geometry())] or c
local next_clients = (float and swap) and c or cltbl[util.get_rectangle_in_direction(v , geomtbl, capi.client.focus:geometry())]
if next_clients or k==5 then
local same, center = capi.client.focus == next_clients,k==5
local geo = center and capi.client.focus:geometry() or next_clients:geometry()