-
-
Notifications
You must be signed in to change notification settings - Fork 765
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
O_NERD and O_EMOJI creates duplicate letters in filename #1692
Comments
Previous discussion: #1662 According to #1662 (reply in thread) v4.7 didn't have this problem (can you confirm this too? @FelixKratz) but I went through the diff between 4.7 and 4.8 and didn't notice anything that might cause it. Also another person who reported the issue was on macos as well (#1662 (reply in thread)) so maybe something in macos is causing it? |
Sorry, I did not search the discussion, only the issues. I have done a quick bisect and this is the commit where it goes wrong: 20e944f This commit changed the codepoints, how would such a change lead to the duplication of filname letters? |
Interestingly, Edit: The problem appears when calling All instances where this is a problem wcswidth reports a length of 2 as seen in the screenshot below, where I display the wcswidth of the icon to the left of the actual item: |
I use emojis on xfce4-terminal and don't see this issue. |
I believe this problem has no trivial fix. It seems that removing if (sel)
attrs |= A_REVERSE; in The problematic new nerdfont chars seem to be 4byte wide, while they where 3bytes before the update. |
@luukvbaal would you able to check this? |
@FelixKratz what happens if you replace |
As soon as any attrs are set that would cause the filename to be redrawn it starts to happen |
@N-R-K @luukvbaal what's the best course of action here? We can't make the next release without fixing this. I see something here that I don't fully understand: #1661 |
I don't think your problem is due to a bug in nnn. Unless you can reproduce this on Linux, maybe your OS is using a different text normalization for unicode encoding (e.g. NFD instead of NFC), so the width of some characters are 2 instead of 1 for you due to decomposition. The locale category values in double quotes are not set explicitly, they are implied values derived from LANG or LC_ALL, but in your output all values are in double quotes, so none of them are explicitly set in your environment. You can try |
I just tried both |
I seem to have found a fix for this: #1694 |
Environment details (Put
x
in the checkbox along with the information)nnn
masterExact steps to reproduce the issue
Clone the repo, enable nerdfonts in the
makefile
and compile with
LDLIBS="-L/opt/homebrew/opt/ncurses/lib/" make
.Some files (with certain icons it appears) have duplicate initial letters as seen in the screenshot below:

as soon as I select the makefile it will also have the duplicate initial letter:

I have done some testing, this seems to also happen with

O_EMOJI
is set to enabled:but not with

O_ICONS
enabled:I have peeked into the source code to find what is different between those options, but did not find a convincing clue.
I have also checked with kitty and alacritty, they both face the same problem.
These are the dynamic libs used by nnn:
The text was updated successfully, but these errors were encountered: