Cursor droppings on wide chars in Windows Terminal #19194

Closed
opened 2026-01-31 06:36:28 +00:00 by claunia · 2 comments
Owner

Originally created by @j4james on GitHub (Jan 10, 2023).

Windows Terminal version

1.16.2641.0

Windows build number

10.0.19044.2364

Other Software

No response

Steps to reproduce

  1. Open a WSL bash shell in Windows Terminal.
  2. Execute printf "\e[2 q\e[2J\e[1;999H\e[D\u306F"; sleep 1; printf "\e[B\n"

This sequence is performing the following steps:

  1. The cursor style is set to a non-blinking block (just to make the bug more obvious).
  2. The screen is cleared, and the cursor moved to the top right corner.
  3. The cursor is then moved one column back and a wide character () is written out.
  4. We wait for a second, to give the cursor a chance to render.
  5. The cursor is moved down a line.
  6. We output a newline (just so the shell prompt is back at the start of the line).

Expected Behavior

At the end of all that, there should only be one cursor visible on the screen.

Actual Behavior

In addition to the real cursor at the shell prompt, there is a second cursor left behind overlapping the character.

image

I realise this is probably not a typical scenario that you're likely to encounter, but it'll become more common once Windows Terminal implements delayed EOL wrap correctly (which is one of the thing I'm hoping to fix in PR #14640).

Originally created by @j4james on GitHub (Jan 10, 2023). ### Windows Terminal version 1.16.2641.0 ### Windows build number 10.0.19044.2364 ### Other Software _No response_ ### Steps to reproduce 1. Open a WSL bash shell in Windows Terminal. 2. Execute `printf "\e[2 q\e[2J\e[1;999H\e[D\u306F"; sleep 1; printf "\e[B\n"` This sequence is performing the following steps: 1. The cursor style is set to a non-blinking block (just to make the bug more obvious). 2. The screen is cleared, and the cursor moved to the top right corner. 3. The cursor is then moved one column back and a wide character (`は`) is written out. 5. We wait for a second, to give the cursor a chance to render. 6. The cursor is moved down a line. 7. We output a newline (just so the shell prompt is back at the start of the line). ### Expected Behavior At the end of all that, there should only be one cursor visible on the screen. ### Actual Behavior In addition to the real cursor at the shell prompt, there is a second cursor left behind overlapping the `は` character. ![image](https://user-images.githubusercontent.com/4181424/211568625-b393f0a2-7efb-4b0a-9e9b-5373563a7e7c.png) I realise this is probably not a typical scenario that you're likely to encounter, but it'll become more common once Windows Terminal implements delayed EOL wrap correctly (which is one of the thing I'm hoping to fix in PR #14640).
claunia added the Needs-TriageResolution-Fix-CommittedIssue-Bug labels 2026-01-31 06:36:28 +00:00
Author
Owner

@j4james commented on GitHub (Jan 10, 2023):

Note that this is not the same thing as #12739, which was the result of deferred cursor drawing. This is the result of a miscalculation in the cursor bounds checking, as explained in https://github.com/microsoft/terminal/pull/13001#discussion_r862125419.

@j4james commented on GitHub (Jan 10, 2023): Note that this is not the same thing as #12739, which was the result of deferred cursor drawing. This is the result of a miscalculation in the cursor bounds checking, as explained in https://github.com/microsoft/terminal/pull/13001#discussion_r862125419.
Author
Owner

@ghost commented on GitHub (Jan 24, 2023):

:tada:This issue was addressed in #14661, which has now been successfully released as Windows Terminal Preview v1.17.1023.🎉

Handy links:

@ghost commented on GitHub (Jan 24, 2023): :tada:This issue was addressed in #14661, which has now been successfully released as `Windows Terminal Preview v1.17.1023`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v1.17.1023) * [Store Download](https://www.microsoft.com/store/apps/9n8g5rfz9xk3?cid=storebadge&ocid=badge)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#19194