aboutsummaryrefslogtreecommitdiff
path: root/libbb/read_key.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2009-05-15 03:27:53 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2009-05-15 03:27:53 +0200
commitc15f40c3e7bfeae1b616c53a574308c2df707b3d (patch)
tree402bed67555916e3ff3c6a08ccc6e994372d4524 /libbb/read_key.c
parent1b0a93edb93a93c30d7fbb35571f109ddf8a67a2 (diff)
downloadbusybox-c15f40c3e7bfeae1b616c53a574308c2df707b3d.tar.gz
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>
Diffstat (limited to 'libbb/read_key.c')
-rw-r--r--libbb/read_key.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libbb/read_key.c b/libbb/read_key.c
index 0f36d20b6..fd100b0ec 100644
--- a/libbb/read_key.c
+++ b/libbb/read_key.c
@@ -66,6 +66,7 @@ int FAST_FUNC read_key(int fd, smalluint *nbuffered, char *buffer)
0
};
+ errno = 0;
n = 0;
if (nbuffered)
n = *nbuffered;