fix(file): account for header, lipgloss block join separators in internal filepicker spacing#1031
Open
bntrtm wants to merge 2 commits intocharmbracelet:mainfrom
Open
fix(file): account for header, lipgloss block join separators in internal filepicker spacing#1031bntrtm wants to merge 2 commits intocharmbracelet:mainfrom
bntrtm wants to merge 2 commits intocharmbracelet:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1025
In brief, this PR fixes an issue wherein the
View()output of thefilemodel 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
bubblesfix; thefilepickerpackage under v1.0.0 needs this identical fix. If that doesn't happen (andgum'sgo.moddoes not then use the new patch),gum filewill 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
fileis 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
SepHeightunderfilepicker/file.go, you'll find that you run back into the exact issue that this PR resolves.