awful.client: check client with filter in history fallback

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-12-29 11:51:46 +01:00
parent aa38e717e6
commit adc91aa37a
1 changed files with 6 additions and 1 deletions

View File

@ -156,8 +156,13 @@ function focus.history.get(screen, idx)
end end
end end
-- Argh nobody found in history, give the first one visible if there is one -- Argh nobody found in history, give the first one visible if there is one
-- that passes the filter.
if counter == 0 then if counter == 0 then
return vc[1] for k, v in ipairs(vc) do
if focus.filter(v) then
return v
end
end
end end
end end