fix: do not move offset on unselect

This commit is contained in:
EdJoPaTo
2024-02-26 18:05:17 +01:00
parent d3386fe016
commit 15f05be46c
2 changed files with 21 additions and 16 deletions
+3
View File
@@ -143,6 +143,9 @@ fn run_app<B: Backend>(terminal: &mut Terminal<B>, mut app: App) -> std::io::Res
KeyCode::Right => app.state.key_right(),
KeyCode::Down => app.state.key_down(&app.items),
KeyCode::Up => app.state.key_up(&app.items),
KeyCode::Esc => {
app.state.select(Vec::new());
}
KeyCode::Home => {
app.state.select_first(&app.items);
}