From ec81ecc45668d3ee3716851cbb42b9a93557bd03 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Sun, 17 Jul 2022 03:48:54 +0000 Subject: fix(input): vim-like command input reset --- src/input.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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); -- cgit v1.2.3