diff options
Diffstat (limited to 'editors/vi.c')
-rw-r--r-- | editors/vi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/editors/vi.c b/editors/vi.c index edcf84240..99babccbb 100644 --- a/editors/vi.c +++ b/editors/vi.c | |||
@@ -1200,7 +1200,7 @@ static char *get_input_line(const char *prompt) | |||
1200 | strcpy(buf, prompt); | 1200 | strcpy(buf, prompt); |
1201 | last_status_cksum = 0; // force status update | 1201 | last_status_cksum = 0; // force status update |
1202 | go_bottom_and_clear_to_eol(); | 1202 | go_bottom_and_clear_to_eol(); |
1203 | write1(prompt); // write out the :, /, or ? prompt | 1203 | write1(buf); // write out the :, /, or ? prompt |
1204 | 1204 | ||
1205 | i = strlen(buf); | 1205 | i = strlen(buf); |
1206 | while (i < MAX_INPUT_LEN - 1) { | 1206 | while (i < MAX_INPUT_LEN - 1) { |
@@ -1209,8 +1209,8 @@ static char *get_input_line(const char *prompt) | |||
1209 | break; // this is end of input | 1209 | break; // this is end of input |
1210 | if (c == term_orig.c_cc[VERASE] || c == 8 || c == 127) { | 1210 | if (c == term_orig.c_cc[VERASE] || c == 8 || c == 127) { |
1211 | // user wants to erase prev char | 1211 | // user wants to erase prev char |
1212 | buf[--i] = '\0'; | ||
1213 | write1("\b \b"); // erase char on screen | 1212 | write1("\b \b"); // erase char on screen |
1213 | buf[--i] = '\0'; | ||
1214 | if (i <= 0) // user backs up before b-o-l, exit | 1214 | if (i <= 0) // user backs up before b-o-l, exit |
1215 | break; | 1215 | break; |
1216 | } else if (c > 0 && c < 256) { // exclude Unicode | 1216 | } else if (c > 0 && c < 256) { // exclude Unicode |