Non-blocking poll in inspector file picker

This commit is contained in:
2026-05-31 21:34:52 +02:00
parent 97b61244d9
commit 0b0916a856
+2 -1
View File
@@ -905,7 +905,7 @@ fn action_inspect_saves<B: Backend>(terminal: &mut Terminal<B>, app: &mut App) -
terminal.draw(|f| {
tui::draw_picker_with_info(f, &app.tui_state, &item_refs, &desc_refs, &mut state, selected_info);
})?;
let key = read_key_event()?;
if let Some(key) = poll_key(250)? {
match key.code {
KeyCode::Up => { let i = state.selected().unwrap_or(0); state.select(Some(i.saturating_sub(1))); }
KeyCode::Down => { let i = state.selected().unwrap_or(0); state.select(Some((i+1).min(files.len().saturating_sub(1)))); }
@@ -952,6 +952,7 @@ fn action_inspect_saves<B: Backend>(terminal: &mut Terminal<B>, app: &mut App) -
KeyCode::Esc => break,
_ => {}
}
}
}
Ok(())
}