projects
/
platform
/
upstream
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
676e95e
)
allow either backspace or DEL, in addition to the user's erase
author
Paul Fox
<pgf@brightstareng.com>
Tue, 13 Sep 2005 22:20:37 +0000
(22:20 -0000)
committer
Paul Fox
<pgf@brightstareng.com>
Tue, 13 Sep 2005 22:20:37 +0000
(22:20 -0000)
char, to be used in get_input_line()
editors/vi.c
patch
|
blob
|
history
diff --git
a/editors/vi.c
b/editors/vi.c
index
6f739a7
..
374d161
100644
(file)
--- 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