Skip to content
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

Only update size when values are valid #28

Merged
merged 1 commit into from
Jul 17, 2023
Merged

Conversation

andrewsun2898
Copy link
Contributor

In some environments the ioctl call for window size will return 0x0, for instance in serial console setups. This causes the input to be truncated making it hard for users to see what they are typing. This performs a check to see if either width or height has a non-zero value before updating the size.

@andrewsun2898
Copy link
Contributor Author

@knz could I get your review on this? I can't seem to assign a reviewer on here for some reason.. Thanks!

getline.go Outdated Show resolved Hide resolved
@andrewsun2898
Copy link
Contributor Author

quick ping on the review, thanks!

In some environments the ioctl call for window size will return 0x0,
for instance in serial console setups. This causes the input to be
truncated making it hard for users to see what they are typing. This
performs a check to see if either width or height has a non-zero value
before updating the size.
@knz
Copy link
Owner

knz commented Jul 17, 2023

I made a small change, but this is otherwise a very nice patch. Thank you!

@knz knz merged commit 486954f into knz:main Jul 17, 2023
8 checks passed
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