hotfix: do not try to navigate the list when editing

This commit is contained in:
Muhammad Nauman Raza 2024-05-28 21:23:02 +01:00
parent e48ac881f1
commit 13f9e10829
Signed by: devraza
GPG key ID: 91EAD6081011574B

View file

@ -40,6 +40,7 @@ pub async fn handle_key_events(key_event: KeyEvent, app: &mut App) -> AppResult<
} }
} }
} }
if app.editing != true {
match key_event.code { match key_event.code {
Char('j') | Down => app.list.next(), Char('j') | Down => app.list.next(),
Char('k') | Up => app.list.previous(), Char('k') | Up => app.list.previous(),
@ -47,5 +48,6 @@ pub async fn handle_key_events(key_event: KeyEvent, app: &mut App) -> AppResult<
Char('G') => app.go_bottom(), Char('G') => app.go_bottom(),
_ => {} _ => {}
} }
}
Ok(()) Ok(())
} }