Skip to content

Conversation

@alexs-sh
Copy link
Contributor

About

This is a continuation of the work on #14442.

This commit adds a fallback terminal size to use when runtime detection fails. Since calling size from Terminal will never fail now, it also changes the function’s signature.

If the client code wants to know whether the call succeeded or failed, it’s still possible to call size via Backend.

Related PR
#14486 PR also solves the problem, but in a slightly different way. This allows us to review, compare, and select the best approach.

Before
image

After
image

Issue
#14101

Thank you

This commit adds a fallback terminal size to use when runtime detection
fails. Since calling `size` from `Terminal` will never fail now, it also
changes the function’s signature.

If the client code wants to know whether the call succeeded or failed,
it’s still possible to call `size` via `Backend`.
Copy link
Member

@the-mikedavis the-mikedavis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a slight preference for this approach since Terminal is meant to close over the Backend. In #14486 we unwrap the same way every time so I'd prefer having the helper in Terminal do that for us.

@the-mikedavis the-mikedavis merged commit ba506a5 into helix-editor:master Sep 23, 2025
7 checks passed
@alexs-sh
Copy link
Contributor Author

Sure. Thanks for the review and merge

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