-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Cursor position is lost when resizing the window if not on the bottom line #10848
Copy link
Copy link
Closed
Labels
Area-OutputRelated to output processing (inserting text into buffer, retrieving buffer text, etc.)Related to output processing (inserting text into buffer, retrieving buffer text, etc.)Issue-BugIt either shouldn't be doing this or needs an investigation.It 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 somethingThe 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 meetingIt'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.This issue/PR is going stale and may be auto-closed without further activity.Priority-2A description (P2)A description (P2)Product-TerminalThe new Windows Terminal.The new Windows Terminal.
Metadata
Metadata
Assignees
Labels
Area-OutputRelated to output processing (inserting text into buffer, retrieving buffer text, etc.)Related to output processing (inserting text into buffer, retrieving buffer text, etc.)Issue-BugIt either shouldn't be doing this or needs an investigation.It 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 somethingThe 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 meetingIt'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.This issue/PR is going stale and may be auto-closed without further activity.Priority-2A description (P2)A description (P2)Product-TerminalThe new Windows Terminal.The new Windows Terminal.
Windows Terminal version (or Windows build number)
10.0.19042.1110 (windows terminal 1.9.1942.0)
Other Software
No response
Steps to reproduce
If the cursor position is not on the last line (of the input), making the screen more narrow will push the cursor down to the last line when lines wrap and the original position is lost; on a resize to make it wider again it stays on the last line.
This affects utilities like "readline" when editing multiple lines of input. Hope it can be fixed as it makes multiline editing not work at all.
To reproduce, run the following batch file:
(note: I think the paste lost it but there should be an
ESCcharacter in front of the[characters to make the escape sequence function; theESC[1Fmoves the cursor one up so it is no longer on the last line.)Expected Behavior
The cursor should always stay at the same point in the input regardless of a window resize. The "old" cmd terminal is correct and the cursor stays at the same point..
Actual Behavior
Here you see the cursor in Windows Terminal (I made it red) move down a line on the resize and lose its position.