FitHeight draws the tree view only as tall as its rows (ATC-225) #28
Loading…
Reference in a new issue
No description provided.
Delete branch "fit-height"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Work package: https://openproject.home.romaine.life/wp/ATC-225
The session always drew the tree view at the host's full height, so a list shorter than that left empty rows inside the box. at-claude's command menu is anchored by its bottom row above its composer, so those rows showed as empty space in it.
Added
core.FitRows(s, cfg, h): the rows the tree view needs, at mosth. That's the rows above the list (firstItemRow: border, panel, prompt bar, headers), one per visible item and the border's bottom. While the/pop-up is open it is tall enough for the pop-up to sit under the row it acts on, which is whereKeyPopupBoxthen puts it.Config.FitHeight, a renderer flag: the session draws inFitRowsrows and its frame has that many lines. Clicks map through the fitted screen, sinceClickRowResultreads its size.Unchanged: with
FitHeightoff (every current host),Renderdraws at the host's height as before. The session now keeps the host's size itself, andResizesets it.Tests:
FitRowsfor a short menu, capped at the host's height, while searching, and with the pop-up placed under its row inside the border; the session's frame and draw height with the flag on and off. fzt-terminal'sgo test ./...passes against this branch.🤖 Generated with Claude Code