aboutsummaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
Diffstat (limited to 'editors')
-rw-r--r--editors/vi.c3
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;