lineedit: use read_key to recognize ESC sequence.
authorDenys Vlasenko <vda.linux@googlemail.com>
Fri, 15 May 2009 01:27:53 +0000 (03:27 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Fri, 15 May 2009 01:27:53 +0000 (03:27 +0200)
commitc15f40c3e7bfeae1b616c53a574308c2df707b3d
tree402bed67555916e3ff3c6a08ccc6e994372d4524
parent1b0a93edb93a93c30d7fbb35571f109ddf8a67a2
lineedit: use read_key to recognize ESC sequence.

This fixes several vi mode bugs and prepares for further fixes.

function                                             old     new   delta
read_line_input                                     3287    5511   +2224
remember_in_history                                    -     499    +499
lineedit_read_key                                      -      70     +70
read_key                                             321     332     +11
input_tab                                           2823       -   -2823
------------------------------------------------------------------------------
(add/remove: 2/1 grow/shrink: 2/0 up/down: 2804/-2823)        Total: -19 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
include/libbb.h
libbb/lineedit.c
libbb/read_key.c