From e57fe4fb900491688c9f84c18ac5d893a607119b Mon Sep 17 00:00:00 2001 From: "Markus F.X.J. Oberhumer" Date: Tue, 27 Apr 2021 13:07:06 +0200 Subject: [PATCH] Improve prompt handling As a long time vi user I find it highly irritating that you cannot backspace out of the command prompt. --- src/input_handler.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/input_handler.cc b/src/input_handler.cc index e2c1bb17..fde468d5 100644 --- a/src/input_handler.cc +++ b/src/input_handler.cc @@ -807,7 +807,8 @@ public: m_callback(line, PromptEvent::Validate, context()); return; } - else if (key == Key::Escape or key == ctrl('c')) + else if (key == Key::Escape or key == ctrl('c') or + ((key == Key::Backspace or key == ctrl('h')) and line.empty())) { history_push(line); context().print_status(DisplayLine{});