diff options
| author | Markus F.X.J. Oberhumer <markus@oberhumer.com> | 2021-04-27 13:07:06 +0200 |
|---|---|---|
| committer | Markus F.X.J. Oberhumer <markus@oberhumer.com> | 2021-04-30 19:42:08 +0200 |
| commit | e57fe4fb900491688c9f84c18ac5d893a607119b (patch) | |
| tree | b345e12ab18e5ad2f8f5fcd7e9e44440d89b1bce /src/input_handler.cc | |
| parent | e04cc1b4c8158ad3848ddc4eba775f9d6a514b5e (diff) | |
Improve prompt handling
As a long time vi user I find it highly irritating that
you cannot backspace out of the command prompt.
Diffstat (limited to 'src/input_handler.cc')
| -rw-r--r-- | src/input_handler.cc | 3 |
1 files changed, 2 insertions, 1 deletions
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{}); |
