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

Long file name is displayed incorrectly! #273

Closed
ruizone opened this issue May 31, 2019 · 12 comments
Closed

Long file name is displayed incorrectly! #273

ruizone opened this issue May 31, 2019 · 12 comments

Comments

@ruizone
Copy link

ruizone commented May 31, 2019

测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试.txt
Long file name is displayed incorrectly. My test platform is termux

@ruizone
Copy link
Author

ruizone commented May 31, 2019

@jarun
Copy link
Owner

jarun commented May 31, 2019

ok, the status bar one.

@ruizone
Copy link
Author

ruizone commented May 31, 2019

In the case of many files, it is very troublesome to select this file.

@ruizone
Copy link
Author

ruizone commented May 31, 2019

The file name is not truncated and will cause the rename to fail.

@jarun
Copy link
Owner

jarun commented May 31, 2019

what's your version of nnn?

@ruizone
Copy link
Author

ruizone commented May 31, 2019

@ruizone
Copy link
Author

ruizone commented May 31, 2019

https://www.dropbox.com/s/s2gv3gmzyvjry4q/TIM%E5%9B%BE%E7%89%8720190531193613.png?dl=0
Move the cursor up and down. The panel displays an error.

@jarun
Copy link
Owner

jarun commented May 31, 2019

@ruizone the issue is wcswidth returns wrong length. It depends on locale. See the notes section:

NOTES         top
       The behavior of wcswidth() depends on the LC_CTYPE category of the
       current locale.

It seems Termux doesn't have locale support.

Please refer to termux/termux-packages#2796 (comment)

@fornwall does this still hold?

@jarun
Copy link
Owner

jarun commented May 31, 2019

I also confirmed that this doesn't happen if I use a long file name with English characters only.

@jarun jarun closed this as completed May 31, 2019
fornwall added a commit to termux/termux-packages that referenced this issue May 31, 2019
fornwall added a commit to termux/termux-packages that referenced this issue May 31, 2019
@fornwall
Copy link

@jarun It's true that wcwidth() and related functions does not work on Android prior to Android 9.0.

However, Termux has a libandroid-support library adding that function that programs can link against. I've enabled that for nnn (in version 2.5-2 of the package), so it should now work.

@ruizone Run pkg up to update and test again!

@jarun
Copy link
Owner

jarun commented May 31, 2019

@fornwall I have tested it and this is fixed now! Thank you so much!

@ruizone
Copy link
Author

ruizone commented Jun 1, 2019

@fornwall The problem has been fixed very well. Thank you.

@lock lock bot locked and limited conversation to collaborators May 21, 2020
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

3 participants