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:
Uli Schlachter 2016-03-06 11:34:44 +01:00
parent ab408103ee
commit 8fd801a6f4
1 changed files with 1 additions and 1 deletions

View File

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