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 { if app.editing != true {
Char('j') | Down => app.list.next(), match key_event.code {
Char('k') | Up => app.list.previous(), Char('j') | Down => app.list.next(),
Char('g') => app.go_top(), Char('k') | Up => app.list.previous(),
Char('G') => app.go_bottom(), Char('g') => app.go_top(),
_ => {} Char('G') => app.go_bottom(),
_ => {}
}
} }
Ok(()) Ok(())
} }