lazygit icon indicating copy to clipboard operation
lazygit copied to clipboard

Incorrect parsing of unicode escape codes

Open GR3YH4TT3R93 opened this issue 1 year ago • 2 comments

Describe the bug In the latest release (v0.43.1), some icons (e.g. nuxt.config.ts which uses the escape sequence \uf1106, and tailwind.config.ts which uses the escape sequence \uf13ff) are showing the incorrect icons (e.g. for nuxt.config.ts \uf110+6 shown as icon6 instead of \f1106 and for tailwind.config.ts \uf13f+f shown as iconf instead of \uf13ff).

To Reproduce Steps to reproduce the behavior:

  1. git init
  2. touch nuxt.config.ts tailwind.config.ts
  3. lazygit
  4. See error

Expected behavior Expected to see the proper icons

Version info: commit=v0.43.1, build date=2024-07-13T12:12:22Z, build source=termux, version=0.43.1, os=android, arch=arm64, git version=2.45.2 git version 2.45.2

GR3YH4TT3R93 avatar Jul 14 '24 12:07 GR3YH4TT3R93

Sorry, you'll also need to ensure to set nerdFontsVersion: "3" in your ~/.config/lazygit/config.yml for the repro

GR3YH4TT3R93 avatar Jul 14 '24 14:07 GR3YH4TT3R93

I have the same issue

CleanShot 2024-08-23 at 13 03 21@2x

And I also can confirm that it's not an issue from my font, here's the screenshot from pkg/gui/presentation/icons/file_icons.go

CleanShot 2024-08-23 at 13 03 59@2x

as well as in neo-tree CleanShot 2024-08-23 at 13 05 26@2x

bmichotte avatar Aug 23 '24 11:08 bmichotte

I encountered a similar problem. https://github.com/LazyVim/LazyVim/discussions/4559#discussion-7293831

xzhang8102 avatar Oct 09 '24 08:10 xzhang8102

Here's a fix: #3975

stefanhaller avatar Oct 09 '24 10:10 stefanhaller

It works! Thank You! Screenshot_2024-10-09-20-04-46-49_84d3000e3f4017145260f7618db1d683

GR3YH4TT3R93 avatar Oct 10 '24 03:10 GR3YH4TT3R93

Can confirm it's working for me as well. Thanks @stefanhaller

CleanShot 2024-10-10 at 08 33 44@2x

bmichotte avatar Oct 10 '24 06:10 bmichotte