terminal: Console doesn't handle colored regions when reflowed
-
Your Windows build number: (Type
verat a Windows Command Prompt) FCU -
What you’re doing and what’s happening: (Copy & paste specific commands and their output, or include screen shots)
- Open Ubuntu session in Console
- Execute the following:
$ cd ~/
$ mkdir temp
$ cd temp
$ mkdir hello
$ mkdir world
$ clear
$ ls
- Grab & drag right-hand Console window edge to resize window width
Expected:
Folders’ colored background should only extend to the end of the folder name:

Actual:
Lines with folders that are last item on line extend folder background coloring to right hand end of line:

See the following for an example of where it goes very wrong:

And it gets worse when lines wrap!

References
Thanks to @jmorrill for reporting here: https://twitter.com/jmorrill/status/915982968094580736
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 21
- Comments: 16 (4 by maintainers)
Commits related to this issue
- Workaround for https://github.com/microsoft/terminal/issues/32 — committed to t5mat/turnbinds by t5mat 3 years ago
- Workaround for https://github.com/microsoft/terminal/issues/32 — committed to t5mat/turnbinds by t5mat 3 years ago
- I thought I could be clever and solve #32 and #12567 at the same time. I was worng. My theory was "fuck perf, let's do it right, and figure out perf later". It didn't work. This wraps lines super... — committed to microsoft/terminal by zadjii-msft 2 years ago
- I think this is a fix for #32 bunch of todos. It also totally takes care of #12567 as well — committed to microsoft/terminal by zadjii-msft 2 years ago
- add workaround for microsoft/terminal#32 — committed to LuanVSO/pwsh-profile by LuanVSO 2 years ago
- add workaround for microsoft/terminal#32 — committed to LuanVSO/pwsh-profile by LuanVSO 2 years ago
- Manually copy trailing attributes on a resize (#12637) ## THE WHITE WHALE This is a fairly naive fix for this bug. It's not terribly performant, but neither is resize in the first place. When ... — committed to microsoft/terminal by zadjii-msft 2 years ago
- Manually copy trailing attributes on a resize (#12637) ## THE WHITE WHALE This is a fairly naive fix for this bug. It's not terribly performant, but neither is resize in the first place. When the b... — committed to microsoft/terminal by zadjii-msft 2 years ago
- Manually copy trailing attributes on a resize (#12637) ## THE WHITE WHALE This is a fairly naive fix for this bug. It's not terribly performant, but neither is resize in the first place. When the b... — committed to microsoft/terminal by zadjii-msft 2 years ago
- remove workaround for microsoft/terminal#32 — committed to LuanVSO/pwsh-profile by LuanVSO 2 years ago
- Manually copy trailing attributes on a resize (#12637) ## THE WHITE WHALE This is a fairly naive fix for this bug. It's not terribly performant, but neither is resize in the first place. When the b... — committed to microsoft/terminal by zadjii-msft 2 years ago
FWIW, I discovered a workaround as a result of posting this question to stackoverflow. If you write a non-breaking space, like so:
patches the issue. Works in Windows Terminal, Windows Console and Fluent Terminal. Not sure if this is an issue on macOS with iterm2/terminal (not sure about linux).