Continue SGR 5 blinking when Terminal is out of focus (but not minimized) #23777

Closed
opened 2026-01-31 08:52:12 +00:00 by claunia · 5 comments
Owner

Originally created by @Nick2bad4u on GitHub (Nov 5, 2025).

Windows Terminal version

Windows Terminal Preview Version: 1.24.2812.0

Windows build number

10.0.22631.0 Microsoft Windows NT 10.0.22631.0

Other Software

N/A

Steps to reproduce

Link to screencast: https://i.gyazo.com/690eb0d26d19c1d1f46f831558c3acaa.mp4

https://github.com/user-attachments/assets/19583495-ffbe-4609-8393-d9f0b8dbba55

Steps to Reproduce

  1. Open Windows Terminal.
  2. Display a large ANSI-formatted output (for example, using Vim, or a CLI application with lots of colors).
    (If you want the exact script I'm using: ansi-star-wars-ndh-r2d2.ps1
  3. Unfocus/minimize the Terminal window.
  4. Observe color values shifting slightly between states until focus is restored. I've noticed it mainly happens with grey colors.

I can provide any other data upon request.

Expected Behavior

ANSI display colors should remain consistent, regardless of window focus (unless using the unfocused theming in wt preview obviously)

Actual Behavior

Colors shift back and forth while the window is not focused. This results in visual flicker or inconsistency for ANSI color output until the window regains focus.

Originally created by @Nick2bad4u on GitHub (Nov 5, 2025). ### Windows Terminal version Windows Terminal Preview Version: 1.24.2812.0 ### Windows build number 10.0.22631.0 Microsoft Windows NT 10.0.22631.0 ### Other Software N/A ### Steps to reproduce Link to screencast: [https://i.gyazo.com/690eb0d26d19c1d1f46f831558c3acaa.mp4](https://i.gyazo.com/690eb0d26d19c1d1f46f831558c3acaa.mp4) https://github.com/user-attachments/assets/19583495-ffbe-4609-8393-d9f0b8dbba55 ## Steps to Reproduce 1. Open Windows Terminal. 2. Display a large ANSI-formatted output (for example, using Vim, or a CLI application with lots of colors). (If you want the exact script I'm using: [ansi-star-wars-ndh-r2d2.ps1](https://raw.githubusercontent.com/Nick2bad4u/PS-Color-Scripts-Enhanced/81844d2c6c419288b48fb36831872b53e53f37ca/ColorScripts-Enhanced/Scripts/ansi-star-wars-ndh-r2d2.ps1) 3. Unfocus/minimize the Terminal window. 4. Observe color values shifting slightly between states until focus is restored. I've noticed it mainly happens with grey colors. I can provide any other data upon request. ### Expected Behavior ANSI display colors should remain consistent, regardless of window focus (unless using the unfocused theming in wt preview obviously) ### Actual Behavior Colors shift back and forth while the window is not focused. This results in visual flicker or inconsistency for ANSI color output until the window regains focus.
claunia added the Area-RenderingIssue-TaskPriority-3Needs-Tag-FixProduct-Terminal labels 2026-01-31 08:52:13 +00:00
Author
Owner

@DHowett commented on GitHub (Nov 5, 2025):

So! This image uses SGR 5 ("Blink") which dims and brightens the foreground color every second or so--every other cursor blink, actually.

Terminal suspends the blinking cursor when it loses focus, and so likewise it suspends the timer that blinks text with the SGR 5 blink rendition.

For now, that means the dim text will remain dim if it was dim when it lost focus, and remain bright if it was bright when it lost focus.

Perhaps we should keep SGR 5 blinking blinking when the window is out of focus?

@DHowett commented on GitHub (Nov 5, 2025): So! This image uses `SGR 5` ("Blink") which dims and brightens the foreground color every second or so--every other cursor blink, actually. Terminal suspends the blinking cursor when it loses focus, and so likewise it suspends the timer that blinks text with the SGR 5 blink rendition. For now, that means the dim text will remain dim if it was dim when it lost focus, and remain bright if it was bright when it lost focus. Perhaps we should keep SGR 5 blinking blinking when the window is out of focus?
Author
Owner

@DHowett commented on GitHub (Nov 5, 2025):

(Also: I suspect your r2-d2 will look a lot better if you turn on builtinGlyphs. I know that it messes with the authorial intent of the font, but it eliminates the gaps between sections filled with the unicode block characters :P)

@DHowett commented on GitHub (Nov 5, 2025): (Also: I suspect your r2-d2 will look a lot better if you turn on `builtinGlyphs`. I know that it messes with the authorial intent of the font, but it eliminates the gaps between sections filled with the unicode block characters :P)
Author
Owner

@Nick2bad4u commented on GitHub (Nov 5, 2025):

So! This image uses SGR 5 ("Blink") which dims and brightens the foreground color every second or so--every other cursor blink, actually.

Terminal suspends the blinking cursor when it loses focus, and so likewise it suspends the timer that blinks text with the SGR 5 blink rendition.

For now, that means the dim text will remain dim if it was dim when it lost focus, and remain bright if it was bright when it lost focus.

Perhaps we should keep SGR 5 blinking blinking when the window is out of focus?

Wow I didn't even know that was a character you could use.

If that's the case I would say this is working as intended then.

Built in glyphs doesn't seem to make a difference when I enable it?

Are you getting a better picture with it on? I turned it off because it was causing some alignment issues I thought but that was a long time ago

I'll try turning it on when I'm back at my PC.

Edit: you're correct it does look better thanks for the tip..you can probably close this as it's working as intended and I just didnt realize there's a blink character 😭

@Nick2bad4u commented on GitHub (Nov 5, 2025): > So! This image uses `SGR 5` ("Blink") which dims and brightens the foreground color every second or so--every other cursor blink, actually. > > Terminal suspends the blinking cursor when it loses focus, and so likewise it suspends the timer that blinks text with the SGR 5 blink rendition. > > For now, that means the dim text will remain dim if it was dim when it lost focus, and remain bright if it was bright when it lost focus. > > Perhaps we should keep SGR 5 blinking blinking when the window is out of focus? Wow I didn't even know that was a character you could use. If that's the case I would say this is working as intended then. Built in glyphs doesn't seem to make a difference when I enable it? Are you getting a better picture with it on? I turned it off because it was causing some alignment issues I thought but that was a long time ago I'll try turning it on when I'm back at my PC. Edit: you're correct it does look better thanks for the tip..you can probably close this as it's working as intended and I just didnt realize there's a blink character 😭
Author
Owner

@DHowett commented on GitHub (Jan 23, 2026):

You know, funny enough, we kept this around... and fixed it with #19330!

@DHowett commented on GitHub (Jan 23, 2026): You know, funny enough, we kept this around... and fixed it with #19330!
Author
Owner

@Nick2bad4u commented on GitHub (Jan 23, 2026):

You know, funny enough, we kept this around... and fixed it with #19330!

well done thanks for following up!

pleasure as always - Nick

@Nick2bad4u commented on GitHub (Jan 23, 2026): > You know, funny enough, we kept this around... and fixed it with [#19330](https://github.com/microsoft/terminal/pull/19330)! well done thanks for following up! pleasure as always - Nick
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#23777