-
-
Notifications
You must be signed in to change notification settings - Fork 976
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
[bug] logging line reduced with ... still wrapped #1377
Comments
That's exactly the problem here. Happens for all paths containing characters wider than a regular ASCII character. I've known about this for a long time, but never found a way to compute the display size / width of a string or character until you mentioned The next problem is |
If it's me, I'll just leave them as they are, right now can't figure out a soultion for that. BTW, in my env those chars are usually displayed as blocks |
(#1377) Setting 'output.shorten' to "eaw" (East-Asian Width) uses a slower algorithm that also considers characters with a width > 1.
This was fixed in bd84530 by implementing the ability to set It's not enabled by default since it produces the wrong results without the needed fonts being available and it is at least an order of magnitude slower than the other, simpler algorithm. |
Although these lines are already reduced by replacing the middle part with ellipsis ("..."), they are still wrapped by the terminal.
I'm not sure but maybe it's caused by some full-width chars
〇〇
, which make the line occupying more length than whatlen()
tells.If my guess was correct, then to fix it we need to re-calculate the "visual length" of the text string, e.g. via a function like this:
The text was updated successfully, but these errors were encountered: