-
Notifications
You must be signed in to change notification settings - Fork 8.8k
ConPTY: Emit DSR CPR on resize #19089
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
// - inheritCursor - a bool indicating if the state machine should expect a | ||
// cursor positioning sequence. See MSFT:15681311. | ||
VtInputThread::VtInputThread(_In_ wil::unique_hfile hPipe, const bool inheritCursor) : | ||
VtInputThread::VtInputThread(_In_ wil::unique_hfile hPipe, std::function<void()> capturedCPR) : |
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.
IDK if this approach is ideal.
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 shall like to Noodle about this
|
src/host/VtIo.cpp
Outdated
|
||
void VtIo::RequestCursorPositionFromTerminal() | ||
{ | ||
if (!_lookingForCursorPosition) |
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.
Wait, but nobody sets this to true?
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.
The debouncing logic was broken so it was always sent. (It does get set to true at the top of the file though.)
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 am not 100% clear on how this all works together
This reverts commit c55aca5 because it is unaware of the VT state and may inject the DSR CPR while e.g. a DCS is going on.
This will help terminals with a reflow behavior unlike
the one implemented in ConPTY, such as VS Code.
Closes #18725
Validation Steps Performed
pushed outside the top viewport. Then type something in the prompt.
Cursor is in a consistent position, even if slightly off. ✅