diff --git a/Kernel/TTY/TTY.cpp b/Kernel/TTY/TTY.cpp index 4740f1a82d5..f02ff7a21ee 100644 --- a/Kernel/TTY/TTY.cpp +++ b/Kernel/TTY/TTY.cpp @@ -221,7 +221,7 @@ void TTY::erase_word() if (ch != ' ') first_char = true; m_input_buffer.dequeue_end(); - echo(m_termios.c_cc[VERASE]); + erase_character(); } } @@ -229,10 +229,17 @@ void TTY::kill_line() { while (can_do_backspace()) { m_input_buffer.dequeue_end(); - echo(m_termios.c_cc[VERASE]); + erase_character(); } } +void TTY::erase_character() +{ + echo(m_termios.c_cc[VERASE]); + echo(' '); + echo(m_termios.c_cc[VERASE]); +} + void TTY::generate_signal(int signal) { if (!pgid()) diff --git a/Kernel/TTY/TTY.h b/Kernel/TTY/TTY.h index bc793741d01..a914099b59e 100644 --- a/Kernel/TTY/TTY.h +++ b/Kernel/TTY/TTY.h @@ -74,6 +74,7 @@ protected: bool can_do_backspace() const; void do_backspace(); void erase_word(); + void erase_character(); void kill_line(); void flush_input();