Skip to content

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

lhecker
Copy link
Member

@lhecker lhecker commented Jul 1, 2025

This will help terminals with a reflow behavior unlike
the one implemented in ConPTY, such as VS Code.

Closes #18725

Validation Steps Performed

  • Tested under a debugger ✅
  • Use PowerShell 5 and reflow lines in the ConPTY buffer until they're
    pushed outside the top viewport. Then type something in the prompt.
    Cursor is in a consistent position, even if slightly off. ✅

@@ -21,13 +21,13 @@ using namespace Microsoft::Console::VirtualTerminal;
// - hPipe - a handle to the file representing the read end of the VT pipe.
// - 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) :
Copy link
Member Author

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.

@lhecker lhecker requested a review from DHowett July 9, 2025 12:43
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.

ConPTY: Ask for the cursor position after each resize
1 participant