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

wrong print of box with title including asian characters #526

Closed
FLAGLORD opened this issue Jun 16, 2023 · 1 comment · Fixed by #527
Closed

wrong print of box with title including asian characters #526

FLAGLORD opened this issue Jun 16, 2023 · 1 comment · Fixed by #527
Labels
bug Something isn't working

Comments

@FLAGLORD
Copy link

If the title of box includes asian characters, it would not print in a pretty way.

┌─ 测试 ─┐
|          |
└──────────┘

if (maxWidth + p.RightPadding + p.LeftPadding - 4) < len(RemoveColorFromString(p.Title)) {

Len() is not suitable for asian characters. Maybe runewidth.StringWidth() is a better choice.

@FLAGLORD FLAGLORD added the bug Something isn't working label Jun 16, 2023
@MarvinJWendt
Copy link
Member

Thanks for reporting the issue! Will be fixed in the next release.

@MarvinJWendt MarvinJWendt linked a pull request Jun 18, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants