awful.util.get_rectangle_in_direction(): Use pairs
This code works just fine with non-integer table keys. Also, this is used by awful.screen.focus_bydirection() and thus will be used with screen objects instead of screen indicies when we get rid of screen indicies. Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
ab408103ee
commit
8fd801a6f4
|
@ -362,7 +362,7 @@ function util.get_rectangle_in_direction(dir, recttbl, cur)
|
|||
local target = nil
|
||||
|
||||
-- We check each object
|
||||
for i, rect in ipairs(recttbl) do
|
||||
for i, rect in pairs(recttbl) do
|
||||
-- Check geometry to see if object is located in the right direction.
|
||||
if is_in_direction(dir, cur, rect) then
|
||||
-- Calculate distance between current and checked object.
|
||||
|
|
Loading…
Reference in New Issue