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

Visual Studio Code integrated terminal and style powerline colors #529

Closed
Ergamon opened this issue Mar 14, 2021 · 3 comments
Closed

Visual Studio Code integrated terminal and style powerline colors #529

Ergamon opened this issue Mar 14, 2021 · 3 comments

Comments

@Ergamon
Copy link

Ergamon commented Mar 14, 2021

Prerequisites

  • [ x ] I have read and understand the CONTRIBUTING guide
  • [ x ] I looked for duplicate issues before submitting this one

Description

The integrated terminal in VS Code seems to have problems with the coloring of the powerline style.

Environment

  • Oh my Posh version: 3.109.0
  • Theme: Paradox (customized)
  • Operating System: Windows 10
  • Shell: PowerShell 7.1.3
  • Terminal: Visual Studio Code

Steps to Reproduce

  1. Basically I have 2 sequences
        {
          "type": "session",
          "style": "plain",
          "foreground": "white",
          "background": "transparent",
          "properties": {
            "prefix": "",
            "postfix": " "
          }          
        },
        {
          "type": "path",
          "style": "powerline",
          "powerline_symbol": "\uE0B0",
          "foreground": "lightWhite",
          "background": "blue",
          "properties": {
            "prefix": " ",
            "folder_icon": "\uF115",
            "folder_separator_icon": "\uE0B1",
            "style": "full",
            "mapped_locations": [["HKCU:", "HKCU"]]
          }
        }

So for the powerline_symbol there is no color set, the coloring is figured out by oh-my-posh

Expected behavior: [What you expected to happen]
In Wndows Terminal it looks like expected:

grafik

Actual behavior: [What actually happened]
grafik

Yes the colors look different due to different themes. But that is not what I am talking about, I am talking about the powerline_symbol "\eE0B0", which is transparent in Windwos Terminal (and every other terminal I tested), but gets black in the VS Code integrated terminal.

Do you have any clue what is going on?

I can fix this by changing every segment to plain and adding lots of text segments. But this is creating quite an ugly theme file.

@JanDeDobbeleer
Copy link
Owner

JanDeDobbeleer commented Mar 14, 2021

@Ergamon that's a bug in vscode. We can't fix that for them 😉

See here.

JanDeDobbeleer added a commit that referenced this issue Mar 14, 2021
relates to #529
relates to #322
relates to #497

Windors terminal and Visual Studio Code do not work well with inversted
ANSI sequences. This weak allows users to override the Tranparency to
the terminal background color removing black elements in their prompt.

Ideally we remove this once they are on par with other terminals, but
that could take a while.

See microsoft/vscode#111762
and microsoft/terminal#7014
@JanDeDobbeleer
Copy link
Owner

@Ergamon given the frequency of this issue, I added the ability to add your terminal's background color. That should allow anyone to fix this as long as they don't use acrylic or transparency in their Windows Terminal (that will still fail).

JanDeDobbeleer added a commit that referenced this issue Mar 14, 2021
relates to #529
relates to #322
relates to #497

Windors terminal and Visual Studio Code do not work well with inversted
ANSI sequences. This weak allows users to override the Tranparency to
the terminal background color removing black elements in their prompt.

Ideally we remove this once they are on par with other terminals, but
that could take a while.

See microsoft/vscode#111762
and microsoft/terminal#7014
Copy link

This issue has been automatically locked since there has not been any recent activity (i.e. last half year) after it was closed. It helps our maintainers focus on the active issues.
If you have found a problem that seems similar, please open a discussion first, complete the body with all the details necessary to reproduce, and mention this issue as reference.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants