Giter VIP home page Giter VIP logo

Comments (7)

justjanne avatar justjanne commented on September 20, 2024 1

That looks like a bug in Windows Terminal instead, the color is set to white and the character should be rendered as regular character. Windows Terminal seems to render it as emoji instead.

from powerline-go.

jamieburchell avatar jamieburchell commented on September 20, 2024

@justjanne Apologies, I didn't know which component was causing the problem. It's possible that this has happened as a result of switching to Terminal Preview (from regular Terminal) for a feature I wanted.

from powerline-go.

justjanne avatar justjanne commented on September 20, 2024

But no matter which component causes the issue, we should look into a way to fix it. Potentially adding a U+FE0E variation selector might already be enough to fix it.

from powerline-go.

thijsputman avatar thijsputman commented on September 20, 2024

Potentially adding a U+FE0E variation selector might already be enough to fix it.

@justjanne, that visually works, but has (recently) started causing some major issues on my end.

In order to remedy some half-width emojis in my "WSL2/Ubuntu/Windows Terminal (Preview)"-setup, I added the following to the configuration some time ago:

"Modes": {
  "patched": {
    "Lock": "\uE0A2\uFE0E",
    "Network": "\u260E\uFE0E",
    "RepoBranch": "\uE0A0\uFE0E",
    "RepoDetached": "\u2693\uFE0E",
    "RepoAhead": "\u2B06\uFE0E",
    "RepoBehind": "\u2B07\uFE0E",
    "RepoConflicted": "\u273C\uFE0E",
    "RepoStashed": "\u2691\uFE0E",
    "RepoNotStaged": "\u270E\uFE0E",
    "RepoStaged": "\u2714\uFE0E"
  }
}

This works like a charm on Ubuntu 20.04 (with bash 5.0.17). After recently upgrading a couple machines to Ubuntu 22.04 (bash 5.2.2) it started to become problematic though: When copy-pasting text onto the terminal or scrolling through history (arrow-key up/down) input becomes totally garbled.

It appears that for every "\uFE0E-emoji" on the prompt, two spaces are "lost". It's most obvious when copy-pasting something: Paste, press left arrow-key once, the entire input on the prompt moves two spaces to the left (and leaves the last two characters duplicated at the end). After this point input is "broken"; what's shown on the screen is not actually what's there any more...

Removing \uFE0E from the above configuration, or navigating to a folder that doesn't have any emojis on its prompt, resolves the issue.

I haven't had the time/opportunity to dig any deeper, so I'm not entirely what's causing it (outside of the Ubuntu upgrade)...

from powerline-go.

jamieburchell avatar jamieburchell commented on September 20, 2024

This is still an issue using v1.24 on Windows Terminal Preview Version 1.18.1462.0 and Ubuntu 22.04.2

from powerline-go.

jamieburchell avatar jamieburchell commented on September 20, 2024

Any update on this @justjanne ?

from powerline-go.

jamieburchell avatar jamieburchell commented on September 20, 2024

microsoft/terminal#15592

from powerline-go.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.