Hidden cursor becomes visible on resize #16250

Open
opened 2026-01-31 05:01:45 +00:00 by claunia · 0 comments
Owner

Originally created by @j4james on GitHub (Dec 23, 2021).

Windows Terminal version

n/a

Windows build number

10.0.19041.1348

Other Software

No response

Steps to reproduce

  1. Open a WSL bash shell in conhost.
  2. Hide the cursor with printf "\e[?25l"
  3. Resize the window.

Expected Behavior

The cursor should remain hidden.

Actual Behavior

The cursor becomes visible after the window is resized.

The source of the problem is the SCREEN_INFORMATION::_AdjustScreenBuffer method, where the cursor is temporarily hidden while the buffer is resizing. The problem is that it doesn't check whether the cursor was already hidden to start with, so it mistakenly sets it visible when the resize is finished.

bb71179a24/src/host/screenInfo.cpp (L1023-L1031)

Originally created by @j4james on GitHub (Dec 23, 2021). ### Windows Terminal version n/a ### Windows build number 10.0.19041.1348 ### Other Software _No response_ ### Steps to reproduce 1. Open a WSL bash shell in conhost. 2. Hide the cursor with `printf "\e[?25l"` 3. Resize the window. ### Expected Behavior The cursor should remain hidden. ### Actual Behavior The cursor becomes visible after the window is resized. The source of the problem is the `SCREEN_INFORMATION::_AdjustScreenBuffer` method, where the cursor is temporarily hidden while the buffer is resizing. The problem is that it doesn't check whether the cursor was already hidden to start with, so it mistakenly sets it visible when the resize is finished. https://github.com/microsoft/terminal/blob/bb71179a24ff186eab999676732afff8a345cc12/src/host/screenInfo.cpp#L1023-L1031
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#16250