feat: ui: Esc cancels the numeric prefix

This commit is contained in:
Jeremy Wall 2024-12-02 18:20:47 -05:00
parent 444bbf3c6d
commit b688940763

View File

@ -366,6 +366,9 @@ impl<'ws> Workspace<'ws> {
fn handle_navigation_input(&mut self, key: event::KeyEvent) -> Result<Option<ExitCode>> {
if key.kind == KeyEventKind::Press {
match key.code {
KeyCode::Esc => {
self.state.reset_n_prefix();
}
KeyCode::Char(d) if d.is_ascii_digit() => {
self.handle_numeric_prefix(d);
}