Skip to content

Unicode box characters don't render correctly in terminal #150777

@willmcgugan

Description

@willmcgugan

Does this issue occur when all extensions are disabled?: Yes/No

Yes

  • VS Code Version: Version: 1.67.2
  • OS Version: macOS 12.4

My project uses unicode box characters to render scrollbars in the terminal. They don't render as expected in the vscode terminal.

Here's the scrollbars in the VSCode terminal:

Screen.Recording.2022-05-31.at.08.54.46.mov

Here's how the scrollbars look in iTerm on MacOS (and other terminal emulators):

Screen.Recording.2022-05-31.at.08.54.02.mov

It looks as though these box characters render with the wrong color. The border around the window above is also rendered with the same box characters, and produces a darker color in VSCode.

Steps to Reproduce:

I've isolated a string which demonstrates the issue (in Python)

scrollbar = '\x1b[48;2;85;85;85m \x1b[0m\x1b[38;2;85;85;85;105m▋\x1b[0m\x1b[105m \x1b[0m\x1b[105m \x1b[0m\x1b[105m \x1b[0m\x1b[105m \x1b[0m\x1b[95;48;2;85;85;85m▋\x1b[0m\x1b[48;2;85;85;85m \x1b[0m\x1b[48;2;85;85;85m \x1b[0m\x1b[48;2;85;85;85m \x1b[0m\n'
print(scrollbar)

This produces the following in iTerm:

Screenshot 2022-05-31 at 09 12 06

And in VSCode:

Screenshot 2022-05-31 at 09 15 26

Metadata

Metadata

Labels

bugIssue identified by VS Code Team member as probable buginsiders-releasedPatch has been released in VS Code Insidersterminal-renderingupstreamIssue identified as 'upstream' component related (exists outside of VS Code)upstream-issue-fixedThe underlying upstream issue has been fixedupstream-issue-linkedThis is an upstream issue that has been reported upstreamverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions