← Commit list

c93eb1a95

Ron Yorston
Ron Yorston
2022-04-20
SUCCESS Duration: 153s

Subject

vi: fix backspace over tab in commands

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

editors/vi.c+2 -1
@@ -1217,10 +1217,11 @@ static char *get_input_line(const char *prompt)
break; // this is end of input
if (isbackspace(c)) {
// user wants to erase prev char
- write1("\b \b"); // erase char on screen
buf[--i] = '\0';
+ go_bottom_and_clear_to_eol();
if (i <= 0) // user backs up before b-o-l, exit
break;
+ write1(buf);
} else if (c > 0 && c < 256) { // exclude Unicode
// (TODO: need to handle Unicode)
buf[i] = c;