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 ebe2713c61
commit ffd45ad9ad

View file

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