diff options
| author | Fuwn <[email protected]> | 2022-07-17 03:48:54 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2022-07-17 03:48:54 +0000 |
| commit | ec81ecc45668d3ee3716851cbb42b9a93557bd03 (patch) | |
| tree | 72fbb7b8d67755ff68db6b48e0332debd7f849e0 /src | |
| parent | feat(app): show old content when inputting (diff) | |
| download | sydney-ec81ecc45668d3ee3716851cbb42b9a93557bd03.tar.xz sydney-ec81ecc45668d3ee3716851cbb42b9a93557bd03.zip | |
fix(input): vim-like command input reset
Diffstat (limited to 'src')
| -rw-r--r-- | src/input.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/input.rs b/src/input.rs index d7d891b..76b6b60 100644 --- a/src/input.rs +++ b/src/input.rs @@ -84,6 +84,8 @@ fn handle_normal_input( ) -> bool { match key.code { KeyCode::Char(':') => { + app.input.clear(); + app.input_mode = Mode::Editing; app.error = None; } @@ -187,8 +189,6 @@ fn handle_editing_input( app.input_mode = Mode::Normal; app.command_history_cursor = 0; - - app.input.clear(); } KeyCode::Char(c) => { app.input.push(c); |