Shell: Handle the "delete" key correctly

We were deleting the wrong character in the line buffer, oopsie!
This commit is contained in:
Andreas Kling 2020-03-01 16:32:35 +01:00
parent ecdd9a5bc6
commit 2695773dd2

View file

@ -304,7 +304,7 @@ String LineEditor::get_line(const String& prompt)
fflush(stdout);
return;
}
m_buffer.remove(m_cursor - 1);
m_buffer.remove(m_cursor);
fputs("\033[3~", stdout);
fflush(stdout);
vt_save_cursor();