From 58f108eb339957f58d5a6034d82b09c4d50b53e3 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Thu, 11 Mar 2010 21:17:55 +0100 Subject: lineedit: fix another corner case with bad unicode input function old new delta read_key 607 646 +39 readit 50 55 +5 getch_nowait 290 295 +5 hash_find 233 234 +1 xstrtoul_range_sfx 231 230 -1 passwd_main 1058 1056 -2 builtin_exit 45 43 -2 cmp_main 649 645 -4 lineedit_read_key 257 245 -12 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 4/5 up/down: 50/-21) Total: 29 bytes Signed-off-by: Denys Vlasenko --- editors/vi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'editors') diff --git a/editors/vi.c b/editors/vi.c index c4bca2a..a22a6a1 100644 --- a/editors/vi.c +++ b/editors/vi.c @@ -2205,7 +2205,7 @@ static int readit(void) // read (maybe cursor) key from stdin int c; fflush_all(); - c = read_key(STDIN_FILENO, readbuffer); + c = read_key(STDIN_FILENO, readbuffer, /*timeout off:*/ -2); if (c == -1) { // EOF/error go_bottom_and_clear_to_eol(); cookmode(); // terminal to "cooked" -- cgit v1.1