Git Product home page Git Product logo

Comments (3)

romkatv avatar romkatv commented on July 17, 2024

Ouch, this is embarrassing. Fixed.

Thanks for the report.

from powerlevel10k.

mvcouwen avatar mvcouwen commented on July 17, 2024

I have a similar issue with custom custom git icons from a nerd font:
POWERLEVEL9K_VCS_GIT_GITHUB_ICON='\uf408'
POWERLEVEL9K_VCS_BRANCH_ICON='\ue0a0'

Schermafbeelding 2019-06-21 om 10 46 44

I can however manually fix it by inserting some spaces...

from powerlevel10k.

romkatv avatar romkatv commented on July 17, 2024

I can however manually fix it by inserting some spaces...

The problem is that \uf408 is within a Private Use Area Unicode range. Neither your terminal nor ZSH have any idea about properties of this character. For example, they cannot know how wide the character is. In some fonts this character is narrow, in others it's wide. When in doubt, your terminal assumes the character is narrow (takes as much space as a single letter such as x). In this case the character is in fact wide, taking the space of xx.

Adding a space after a wide character that your terminal thinks is narrow is the correct (and only) solution. You might want to add spaces after other icons, too. For example, your prompt might look better with a space after the folder icon, and another space after branch icon. Keep in mind that once you switch to another font, you may end up with too many spaces in your prompt, so you'll have to change icons in your theme config.

from powerlevel10k.

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.