Cursor movement is not always detected on double-width lines #17232
Labels
Issue-Bug
It either shouldn't be doing this or needs an investigation.
Needs-Triage
It's a new issue that the core contributor team needs to triage at the next triage meeting
Windows Terminal version
1.21.1272.0
Windows build number
10.0.19045.4291
Other Software
No response
Steps to reproduce
Expected Behavior
This starts by setting the cursor style to a steady block so it's easy to see, then positions the cursor in column 11 and moves it left by 1 column every second until it reaches column 1.
Actual Behavior
When it gets to column 3 is pauses for 2 seconds before jumping to column 1. You never see the cursor in column 2.
This is because of the way conpty determines whether the cursor has moved in the
InvalidateCursor
method here:terminal/src/renderer/vt/invalidate.cpp
Line 78 in 49e4eea
The
psrRegion
is in screen coordinates, while the_lastText
position in buffer coordinates. So on a double-width line, when moving from column 3 to column 2, the_lastText
column is 3, and thepsrRegion->origin
is also 3, because buffer column 2 spans screen columns 3 and 4. Thus it seems like no movement has occurred.This was another bug introduced by PR #17194.
The text was updated successfully, but these errors were encountered: