tab complete fix for nil hints

This commit is contained in:
payonel 2017-05-14 23:53:00 -07:00
parent 807dfb7224
commit e9680ec0e8
2 changed files with 1 additions and 2 deletions

View File

@ -193,8 +193,6 @@ function term.read(history, dobreak, hint, pwchar, filter)
inject_filter(handler, filter)
inject_mask(cursor, dobreak, pwchar)
-- todo, make blinking work from here
-- handler.blink or w.blink
return tty.read(handler, cursor)
end

View File

@ -63,6 +63,7 @@ local function tab_handler(handler, cursor)
if cache_size == 1 and cache.i == 0 then
-- there was only one solution, and the user is asking for the next
handler.cache = hints(cache[1], cursor.index + 1)
if not handler.cache then return end
handler.cache.i = -1
cache = handler.cache
cache_size = #cache