Skip to content

feat(addon-fit): fit to specific dimensions #5316

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

DSpeichert
Copy link

Allows more control by checking proposed dimensions with additional logic.

Allows more control by checking proposed dimensions with additional logic.
@Tyriar
Copy link
Member

Tyriar commented Apr 22, 2025

The whole point of the fit addon is to measure the container. You should just not use it and call Terminal.resize with those dimensions?

@Tyriar Tyriar closed this Apr 22, 2025
@DSpeichert
Copy link
Author

My workflow was to use this addon's proposeDimensions() first and validate it according to some external criteria.
If it passed, I'd call fit() with these specific dimensions. Since fit() uses internal/private APIs, I preferred to avoid copying that code to force redraw and rely on the addon, in case it changes in future. You are right that I could call Terminal.resize directly though.

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.

2 participants