-
Notifications
You must be signed in to change notification settings - Fork 6
Move to Terminal-API #10
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
Conversation
|
I'd like to get feedback on the PRs first and when things look good release Terminal-API. This will allow me to still make changes to T-API without burning version numbers. |
| $p | ||
| my $fd = $.output.native-descriptor; | ||
| my $size = Terminal::API::get-window-size($fd); | ||
| Promise.kept(($size.rows, $size.cols)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious about the reason for this change ... does the clipping behavior trick not work on Windows?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't try, but would suspect that it'd work. I seem to recall that you explicitly asked for an API to retrieve the window size, I think the cause was Terminal-Print, where the size was retrieved via tput cols/rows. The change here was just for uniformness / simplicity. Would you prefer to keep it as it was before?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's separate out this bit into a separate PR. We may need it, but I'd rather not make this change as part of this PR. (Though both small, the two diff blocks are in my mind two separate conceptual changes, one of which may or may not be needed.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
This makes this dist work on Windows.
32829ac to
111f4d7
Compare
|
Will merge this one and then bump the Terminal::API requirement to latest as of this writing (1.0.3). |
This makes this dist work on Windows and also replaces the VT based terminal size detection.
Part of a set of PRs in Terminal-LineEditor, Terminal-Print and Terminal-Widgets.
Don't merge yet, Terminal-API isn't released yet!