projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
0ef24c6
)
allow both ^H and DEL to backspace in insert mode (bug #23)
author
Paul Fox
<pgf@brightstareng.com>
Mon, 18 Jul 2005 22:17:25 +0000
(22:17 -0000)
committer
Paul Fox
<pgf@brightstareng.com>
Mon, 18 Jul 2005 22:17:25 +0000
(22:17 -0000)
editors/vi.c
patch
|
blob
|
history
diff --git
a/editors/vi.c
b/editors/vi.c
index fc1deeb3c29fda21f39c8a702c3b013cc0f06221..eb0aa33f6078df4543afa3bf0a8d12c7bf4e4241 100644
(file)
--- a/
editors/vi.c
+++ b/
editors/vi.c
@@
-1612,7
+1612,7
@@
static Byte *char_insert(Byte * p, Byte c) // insert the char c at 'p'
if ((p[-1] != '\n') && (dot>text)) {
p--;
}
if ((p[-1] != '\n') && (dot>text)) {
p--;
}
- } else if (c == erase_char
) {
// Is this a BS
+ } else if (c == erase_char
|| c == 8 || c == 127) {
// Is this a BS
// 123456789
if ((p[-1] != '\n') && (dot>text)) {
p--;
// 123456789
if ((p[-1] != '\n') && (dot>text)) {
p--;
@@
-3083,8
+3083,8
@@
key_cmd_mode:
break;
case 'h': // h- move left
case VI_K_LEFT: // cursor key Left
break;
case 'h': // h- move left
case VI_K_LEFT: // cursor key Left
- case 8:
// ctrl-H- move left (This may be ERASE char)
- case 127:
// DEL- move left (This may be ERASE char)
+ case 8: // ctrl-H- move left (This may be ERASE char)
+ case 127: // DEL- move left (This may be ERASE char)
if (cmdcnt-- > 1) {
do_cmd(c);
} // repeat cnt
if (cmdcnt-- > 1) {
do_cmd(c);
} // repeat cnt
@@
-3249,7
+3249,7
@@
key_cmd_mode:
//
// dont separate these two commands. 'f' depends on ';'
//
//
// dont separate these two commands. 'f' depends on ';'
//
- //**** fall thru to ... '
i
'
+ //**** fall thru to ... '
;
'
case ';': // ;- look at rest of line for last forward char
if (cmdcnt-- > 1) {
do_cmd(';');
case ';': // ;- look at rest of line for last forward char
if (cmdcnt-- > 1) {
do_cmd(';');