Skip to content

Fix/UI stop scrolling past last item#2593

Open
waj wants to merge 2 commits into
simonmichael:mainfrom
waj:fix/ui-stop-scrolling-past-last-item
Open

Fix/UI stop scrolling past last item#2593
waj wants to merge 2 commits into
simonmichael:mainfrom
waj:fix/ui-stop-scrolling-past-last-item

Conversation

@waj

@waj waj commented May 16, 2026

Copy link
Copy Markdown

Finally made a fix for #2278. Now the lists don't keep scrolling when the end of the list is reached.

Also I did a small change in how the lists are initialized and centered, so there's no blank space at the bottom for lists with enough items to fill the screen.

I feel this behavior is now more familiar and matches other TUI tools with scrolling lists.

Closes #2278

waj added 2 commits May 16, 2026 12:40
When pressing DOWN at the last item, the viewport was being scrolled
further into blank padding space, causing real items to disappear off
the top of the screen. Now the cursor simply stops at the last item.
scrollSelectionToMiddle now caps the viewport so blank padding is never
visible below the last real item, showing as many items as possible
while keeping the selection on screen.
@simonmichael

Copy link
Copy Markdown
Owner

Thanks for the PR.
We haven't had review bandwidth to keep up with PRs lately; this will be reviewed ASAP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

hledger-ui keeps scrolling at the end of lists

2 participants