improve input feedback by discarding unreachable hints
This commit is contained in:
parent
6ad4c5530e
commit
b154d4800f
|
@ -112,6 +112,10 @@ module Fingers
|
||||||
hints_by_text[captured_text] = hint
|
hints_by_text[captured_text] = hint
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if !state.input.empty? && !hint.starts_with?(state.input)
|
||||||
|
return text
|
||||||
|
end
|
||||||
|
|
||||||
formatter.format(
|
formatter.format(
|
||||||
hint: hint,
|
hint: hint,
|
||||||
highlight: text,
|
highlight: text,
|
||||||
|
|
|
@ -73,7 +73,7 @@ module Fingers
|
||||||
if match
|
if match
|
||||||
handle_match(match)
|
handle_match(match)
|
||||||
else
|
else
|
||||||
tmux.display_message(state.input, 300)
|
render
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue