-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only update size when values are valid
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.
- Loading branch information
1 parent
e176cdf
commit 20f487f
Showing
2 changed files
with
14 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
run | ||
reset | ||
resize 40 25 | ||
resize 0 0 | ||
---- | ||
TEA WINDOW SIZE: {40 25} | ||
TEA WINDOW SIZE: {0 0} | ||
-- view: | ||
> [7m [0m  | ||
M-? toggle key help • C-d erase/stop🛇 |