From 2695773dd28ae94dd8f6ff01beacb58af0863b62 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 1 Mar 2020 16:32:35 +0100 Subject: [PATCH] Shell: Handle the "delete" key correctly We were deleting the wrong character in the line buffer, oopsie! --- Shell/LineEditor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Shell/LineEditor.cpp b/Shell/LineEditor.cpp index 84b97384be..83a959bf97 100644 --- a/Shell/LineEditor.cpp +++ b/Shell/LineEditor.cpp @@ -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();