Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
willmcgugan opened this issue May 31, 2022 · 5 comments · Fixed by #151169
Closed

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

willmcgugan opened this issue May 31, 2022 · 5 comments · Fixed by #151169
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders terminal-rendering upstream Issue identified as 'upstream' component related (exists outside of VS Code) upstream-issue-fixed The underlying upstream issue has been fixed upstream-issue-linked This is an upstream issue that has been reported upstream verified Verification succeeded
Milestone

Comments

@willmcgugan
Copy link

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

@yume-chan
Copy link
Contributor

Another issue caused by terminal.integrated.minimumContrastRatio

1:

image

4.5:

image

@Tyriar
Copy link
Member

Tyriar commented May 31, 2022

We should also exclude box drawing characters from the setting, anything decorative.

@Tyriar Tyriar added bug Issue identified by VS Code Team member as probable bug terminal-rendering upstream Issue identified as 'upstream' component related (exists outside of VS Code) labels May 31, 2022
@Tyriar Tyriar self-assigned this May 31, 2022
@Tyriar Tyriar added this to the May 2022 milestone May 31, 2022
@Tyriar
Copy link
Member

Tyriar commented May 31, 2022

Upstream xtermjs/xterm.js#3843

@Tyriar Tyriar added upstream-issue-linked This is an upstream issue that has been reported upstream upstream-issue-fixed The underlying upstream issue has been fixed labels May 31, 2022
Tyriar added a commit that referenced this issue Jun 2, 2022
@Tyriar Tyriar mentioned this issue Jun 2, 2022
@VSCodeTriageBot VSCodeTriageBot added unreleased Patch has not yet been released in VS Code Insiders insiders-released Patch has been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels Jun 2, 2022
@aeschli aeschli added the verified Verification succeeded label Jun 3, 2022
@aeschli
Copy link
Contributor

aeschli commented Jun 3, 2022

After fix:
image
Marking as verified.

@willmcgugan
Copy link
Author

You guys are awesome.

@github-actions github-actions bot locked and limited conversation to collaborators Jul 17, 2022
lemanschik pushed a commit to code-oss-dev/code that referenced this issue Nov 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders terminal-rendering upstream Issue identified as 'upstream' component related (exists outside of VS Code) upstream-issue-fixed The underlying upstream issue has been fixed upstream-issue-linked This is an upstream issue that has been reported upstream verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants