When we see an unknown sequence, it is not enough
commit664e7d31b6c073154580ff913950fc393ae34623
authorDenys Vlasenko <vda.linux@googlemail.com>
Tue, 21 May 2013 12:35:54 +0000 (21 15:35 +0300)
committerSlava Zanko <slavazanko@gmail.com>
Thu, 23 May 2013 08:42:02 +0000 (23 11:42 +0300)
treedbbda4b88393efbc754f360bdf1f203acc2933da
parentecd3b62b8efea4d94fe8162eb0b50d223494efd0
When we see an unknown sequence, it is not enough
to drop already received part - there can be more of it
coming over e.g. a serial line.

To prevent interpreting it as a random garbage,
eat and discard all chars that follow.
Small, but non-zero timeout is needed to reconnect
escape sequence split up by a serial line.

Before this change, Ctrl-Alt-Shift-Right_Arrow generates "1;8C"
bogus "input" in MC on my machine; after the change,
nothing is generated.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
lib/tty/key.c