diff --git a/CHANGELOG.md b/CHANGELOG.md index bc05947..cbab423 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ - **Native device selection and playback startup**: Made the local `spotatui` Connect device selectable when Spotify's devices API omits it, recovered stale native streaming sessions after long idle, fixed `Esc`/`Enter` handling in the device selector, and avoided `NO_ACTIVE_DEVICE` playback failures when native streaming is connected but no Spotify playback context is active ([#292](https://github.com/LargeModGames/spotatui/issues/292)). - **Search box no longer traps focus on submit**: Pressing `Enter` to run a search now always moves focus to the results list, including when re-searching while already on the Search screen (previously focus stayed stuck in the input box) ([#191](https://github.com/LargeModGames/spotatui/issues/191)). - **Cover-art load failures are non-fatal**: A failed album-image fetch is now logged and ignored instead of surfacing a blocking error and aborting the now-playing update, so playback metadata keeps updating when artwork can't be loaded ([#142](https://github.com/LargeModGames/spotatui/issues/142)). +- **Settings list scrolls to follow the selection**: The Settings screen now renders its item list statefully, so the viewport scrolls to keep the highlighted setting in view instead of clipping items below the fold on shorter terminals (previously only fully visible when the terminal was tall enough to show every item). The selected row is now also marked with a `▶` indicator, matching the other list screens. ## [v0.38.6] 2026-05-28 diff --git a/src/tui/ui/settings.rs b/src/tui/ui/settings.rs index 2669bf3..e245734 100644 --- a/src/tui/ui/settings.rs +++ b/src/tui/ui/settings.rs @@ -3,7 +3,7 @@ use ratatui::{ layout::{Alignment, Constraint, Layout, Rect}, style::{Modifier, Style}, text::{Line, Span}, - widgets::{Block, Borders, Clear, List, ListItem, Paragraph, Tabs}, + widgets::{Block, Borders, Clear, List, ListItem, ListState, Paragraph, Tabs}, Frame, }; @@ -162,7 +162,10 @@ fn draw_settings_list(f: &mut Frame<'_>, app: &App, area: Rect) { ), ); - f.render_widget(list, area); + let mut state = ListState::default(); + state.select(Some(app.settings_selected_index)); + + f.render_stateful_widget(list, area, &mut state); } fn format_terminal_input_caps(app: &App) -> String {