diff options
author | Ron Yorston <rmy@pobox.com> | 2022-05-12 08:11:27 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2022-05-12 08:11:27 +0100 |
commit | 7c8c7681a9c8fac1fb8cf77f5950d32885ebb08c (patch) | |
tree | 4e21c0c676bc424ba10e616d9f97de76bfe4409c /editors/vi.c | |
parent | f637f37e0bd2e295936a7b4836676846693219aa (diff) | |
parent | 1099a27696cd733041db97f99da4e22ecd2424e5 (diff) | |
download | busybox-w32-7c8c7681a9c8fac1fb8cf77f5950d32885ebb08c.tar.gz busybox-w32-7c8c7681a9c8fac1fb8cf77f5950d32885ebb08c.tar.bz2 busybox-w32-7c8c7681a9c8fac1fb8cf77f5950d32885ebb08c.zip |
Merge branch 'busybox' into merge
Diffstat (limited to 'editors/vi.c')
-rw-r--r-- | editors/vi.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/editors/vi.c b/editors/vi.c index dd8dd488a..e28db3ab6 100644 --- a/editors/vi.c +++ b/editors/vi.c | |||
@@ -1281,10 +1281,11 @@ static char *get_input_line(const char *prompt) | |||
1281 | break; // this is end of input | 1281 | break; // this is end of input |
1282 | if (isbackspace(c)) { | 1282 | if (isbackspace(c)) { |
1283 | // user wants to erase prev char | 1283 | // user wants to erase prev char |
1284 | write1("\b \b"); // erase char on screen | ||
1285 | buf[--i] = '\0'; | 1284 | buf[--i] = '\0'; |
1285 | go_bottom_and_clear_to_eol(); | ||
1286 | if (i <= 0) // user backs up before b-o-l, exit | 1286 | if (i <= 0) // user backs up before b-o-l, exit |
1287 | break; | 1287 | break; |
1288 | write1(buf); | ||
1288 | } else if (c > 0 && c < 256) { // exclude Unicode | 1289 | } else if (c > 0 && c < 256) { // exclude Unicode |
1289 | // (TODO: need to handle Unicode) | 1290 | // (TODO: need to handle Unicode) |
1290 | buf[i] = c; | 1291 | buf[i] = c; |