Skip to content

fix(file): account for header, lipgloss block join separators in internal filepicker spacing#1031

Open
bntrtm wants to merge 2 commits intocharmbracelet:mainfrom
bntrtm:v1-hotfix-fp-height
Open

fix(file): account for header, lipgloss block join separators in internal filepicker spacing#1031
bntrtm wants to merge 2 commits intocharmbracelet:mainfrom
bntrtm:v1-hotfix-fp-height

Conversation

@bntrtm
Copy link
Copy Markdown

@bntrtm bntrtm commented Mar 23, 2026

Fixes #1025

In brief, this PR fixes an issue wherein the View() output of the file model is pushed up and out of view by one line. It also factors in spacing necessitated by the presence of a potential header. The issue link above lays out everything in far more detail (the "why," "how," et cetera).

It's worth noting that the fix relies somewhat on an upstream bubbles fix; the filepicker package under v1.0.0 needs this identical fix. If that doesn't happen (and gum's go.mod does not then use the new patch), gum file will instead then overcompensate in granting cell space to the model's internal filepicker after merging this PR, allowing the shell command to remain rendered within the TUI.

In the very least, merging this PR does mean that file is functionally fixed, even if the first line gets a little crowded without the bubbles PR merge.

If desired, this separate branch in my fork of gum demonstrates what this fix looks like in v1.0.0 alongside a (only somewhat unrelated) bubbles(filepicker) v1 fix. If you clone it and remove each addition of SepHeight under filepicker/file.go, you'll find that you run back into the exact issue that this PR resolves.

@bntrtm bntrtm requested a review from a team as a code owner March 23, 2026 05:59
@bntrtm bntrtm requested review from andreynering and aymanbagabas and removed request for a team March 23, 2026 05:59
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.

Gum file removes the first line thereby missing a file

1 participant