From 704f9f774671aee6744d2dfe0434c161da5f837e Mon Sep 17 00:00:00 2001 From: Jeremy Wall Date: Sat, 28 Dec 2024 10:49:28 -0500 Subject: [PATCH] feat: clear char queue on Esc --- src/ui/mod.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/ui/mod.rs b/src/ui/mod.rs index 53974e5..b80aff0 100644 --- a/src/ui/mod.rs +++ b/src/ui/mod.rs @@ -652,6 +652,7 @@ impl<'ws> Workspace<'ws> { match key.code { KeyCode::Esc => { self.state.reset_n_prefix(); + self.state.char_queue.clear(); } KeyCode::Char(d) if d.is_ascii_digit() => { self.handle_numeric_prefix(d); @@ -727,12 +728,6 @@ impl<'ws> Workspace<'ws> { Ok(()) })?; } - KeyCode::Char('s') - if key.modifiers == KeyModifiers::HYPER - || key.modifiers == KeyModifiers::SUPER => - { - self.save_file()?; - } KeyCode::Char('l') if key.modifiers == KeyModifiers::CONTROL => { self.run_with_prefix(|ws: &mut Workspace<'_>| -> Result<()> { let Address { row: _, col } = &ws.book.location;