Skip to content
Commit 2dd86b90 authored by Yurii Monakov's avatar Yurii Monakov Committed by Tom Rini
Browse files

cli: Consume invalid escape sequences early



Unexpected 'Esc' key presses are accumulated internally, even if it is
already clear that the current escape sequence is invalid. This results
in weird behaviour. For example, the next character after 'Esc' key
simply disappears from input and 'Unknown command' is printed
after 'Enter'.

This commit fixes some issues with extra 'Esc' keys entered by user:

1. Sequence <Esc><Esc><Enter> right after autoboot stop gives:
=>
nknown command 'ry 'help'
=>
2. Sequence <Esc><p><r><i><Enter> gives:
=> ri
Unknown command 'ri' - try 'help'
=>
3. Extra 'Esc' key presses break backspace functionality.

Signed-off-by: default avatarYurii Monakov <monakov.y@gmail.com>
Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
parent 5cab3515
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment