Cursor invalidation failing when line renditions are used #21666

Open
opened 2026-01-31 07:51:27 +00:00 by claunia · 0 comments
Owner

Originally created by @j4james on GitHub (May 9, 2024).

Windows Terminal version

1.21.1272.0

Windows build number

10.0.19045.4291

Other Software

No response

Steps to reproduce

  1. Open a WSL bash shell
  2. Execute the following statement:
    printf "\ec\e[999B\n\e[H\e#6\n\e[1 q"; read
    
  3. Type some text and note whether the cursor is blinking.
  4. Backspace to the start of the line and check the cursor again.

Expected Behavior

The final escape sequence in that printf is a DECSCUSR command, setting the cursor style to a blinking block, so it should be blinking the whole time (except maybe when it's actually moving).

Actual Behavior

The cursor blinks at the start of the line, but doesn't blink in any other column. The issue isn't specifically related to blinking, though. It can also manifest as almost constant cursor "droppings", but this test case was the easiest to reproduce.

And note that it also fails on openconsole/conhost if you've configured it to use the Atlas engine, so it's not a conpty issue, but it appears to be Atlas only.

Line rendition has got something to do with it - the first line is set to double-width in this test - but it's not only the double-width line that is affected. And I think the scroll offset is also a factor, which is why this test case forces a linefeed at the bottom of the page.

As far as I can tell from a git bisect, it first broke in commit 20b0bed46d (PR #15500).

Originally created by @j4james on GitHub (May 9, 2024). ### Windows Terminal version 1.21.1272.0 ### Windows build number 10.0.19045.4291 ### Other Software _No response_ ### Steps to reproduce 1. Open a WSL bash shell 2. Execute the following statement: ``` printf "\ec\e[999B\n\e[H\e#6\n\e[1 q"; read ``` 3. Type some text and note whether the cursor is blinking. 4. Backspace to the start of the line and check the cursor again. ### Expected Behavior The final escape sequence in that `printf` is a `DECSCUSR` command, setting the cursor style to a blinking block, so it should be blinking the whole time (except maybe when it's actually moving). ### Actual Behavior The cursor blinks at the start of the line, but doesn't blink in any other column. The issue isn't specifically related to blinking, though. It can also manifest as almost constant cursor "droppings", but this test case was the easiest to reproduce. And note that it also fails on openconsole/conhost if you've configured it to use the Atlas engine, so it's not a conpty issue, but it appears to be Atlas only. Line rendition has got something to do with it - the first line is set to double-width in this test - but it's not only the double-width line that is affected. And I think the scroll offset is also a factor, which is why this test case forces a linefeed at the bottom of the page. As far as I can tell from a git bisect, it first broke in commit 20b0bed46df71c596b4fb68edfb6bb4b4ebf1c89 (PR #15500).
claunia added the Needs-TriageIssue-Bug labels 2026-01-31 07:51:27 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#21666