Skip to content

Cursor position is lost when resizing the window horizontally #10868

@daanx

Description

@daanx

Windows Terminal version (or Windows build number)

10.0.19042.1110 (windows terminal 1.9.1942.0)

Other Software

No response

Steps to reproduce

When the windows is horizontally resized the cursor position is lost; on the narrowing the cursor wraps to the next line, but on widening again the cursor goes incorrectly to the start of the previous line.
(Extra heisenbug: if you quickly resize narrow again the cursor will go randomly in the text :-)

To reproduce run the following batch file:

@echo off
set /p "ANSWER=prompt prompt prompt prompt prompt prompt prompt>"

Expected Behavior

On the old cmd terminal the batch file works as intended.

Actual Behavior

Here is what happens in Windows terminal (I colored the cursor in red):

cursor-bug

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-OutputRelated to output processing (inserting text into buffer, retrieving buffer text, etc.)Issue-BugIt either shouldn't be doing this or needs an investigation.Needs-Author-FeedbackThe original author of the issue/PR needs to come back and respond to somethingNeeds-TriageIt's a new issue that the core contributor team needs to triage at the next triage meetingNo-Recent-ActivityThis issue/PR is going stale and may be auto-closed without further activity.Priority-2A description (P2)Product-TerminalThe new Windows Terminal.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions