aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFuwn <[email protected]>2022-07-17 03:48:54 +0000
committerFuwn <[email protected]>2022-07-17 03:48:54 +0000
commitec81ecc45668d3ee3716851cbb42b9a93557bd03 (patch)
tree72fbb7b8d67755ff68db6b48e0332debd7f849e0
parentfeat(app): show old content when inputting (diff)
downloadsydney-ec81ecc45668d3ee3716851cbb42b9a93557bd03.tar.xz
sydney-ec81ecc45668d3ee3716851cbb42b9a93557bd03.zip
fix(input): vim-like command input reset
-rw-r--r--src/input.rs4
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);