Skip to content

Conversation

@davidferneding
Copy link

While adding the padding parameter to file, the component has been refactored to use m.filepicker.SetHeight instead of the deprecated property m.filepicker.Height. Since this change, the size has been calculated based on the window height, overriding the value passed with --height.

This adds a new maxHeight property to constrain the maximum height of the file picker to the value passed by --height. The current behaviour of constraining the height to the window height has been preserved.

Refs: 6045525

Fixes #969

While adding the padding parameter to file, the component has been
refactored to use `m.filepicker.SetHeight` instead of the deprecated
property `m.filepicker.Height`. Since this change, the size has
been calculated based of the window height, overriding the value
passed with `--height`.
This adds a new `maxHeight` property to constrain the maximum
height of the file picker to the value passed by `--height`.

Refs: 6045525, charmbracelet#969
@davidferneding davidferneding requested a review from a team as a code owner October 9, 2025 12:53
@davidferneding davidferneding requested review from aymanbagabas and kujtimiihoxha and removed request for a team October 9, 2025 12:53
@tree-1917
Copy link

Hello @davidferneding, I try your solution to solve the bug in height calculation but I found it's change the behavior for the file command and can simply solve this problem by change the equation height := msg.Height - m.padding[0] - m.padding[2] - 1 it's works and you can see the screenshots before and after .

Before Bug

image

After No Bug

image

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.

New version makes gum file command fail to correctly display

2 participants