svn commit: trunk/busybox/editors
pgf at busybox.net
pgf at busybox.net
Tue Sep 13 22:20:39 UTC 2005
Author: pgf
Date: 2005-09-13 15:20:37 -0700 (Tue, 13 Sep 2005)
New Revision: 11451
Log:
allow either backspace or DEL, in addition to the user's erase
char, to be used in get_input_line()
Modified:
trunk/busybox/editors/vi.c
Changeset:
Modified: trunk/busybox/editors/vi.c
===================================================================
--- trunk/busybox/editors/vi.c 2005-09-13 21:04:12 UTC (rev 11450)
+++ trunk/busybox/editors/vi.c 2005-09-13 22:20:37 UTC (rev 11451)
@@ -2416,7 +2416,8 @@
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
More information about the busybox-cvs
mailing list