From ebd5534c76104b2aca1f636096a9a01d32f7d340 Mon Sep 17 00:00:00 2001 From: pgf Date: Tue, 13 Sep 2005 22:20:37 +0000 Subject: allow either backspace or DEL, in addition to the user's erase char, to be used in get_input_line() git-svn-id: svn://busybox.net/trunk/busybox@11451 69ca8d6d-28ef-0310-b511-8ec308f3f277 --- editors/vi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/editors/vi.c b/editors/vi.c index 6f739a714..374d161d1 100644 --- a/editors/vi.c +++ b/editors/vi.c @@ -2416,7 +2416,8 @@ static Byte *get_input_line(Byte * prompt) // get input line- use "status line" c = get_one_char(); // read user input if (c == '\n' || c == '\r' || c == 27) break; // is this end of input - if (c == erase_char) { // user wants to erase prev char + if (c == erase_char || c == 8 || c == 127) { + // user wants to erase prev char i--; // backup to prev char buf[i] = '\0'; // erase the char buf[i + 1] = '\0'; // null terminate buffer -- cgit v1.2.3-55-g6feb