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

Fixes chinse chars being wrong len #118

Closed
wants to merge 7 commits into from
Closed

Fixes chinse chars being wrong len #118

wants to merge 7 commits into from

Conversation

qoft
Copy link
Contributor

@qoft qoft commented May 17, 2023

Fixes #98
image

Ignore the 0xe0 byte error when alert is open, and pressing arrow key twice. (Normally causing error & exit)
@bczsalba
Copy link
Owner

Unfortunately this pulls in a new dependency, which I'm not super keen on. Since it's kind of impossible for me to do this manually in a completely perfect and reliable way I'm not against it, but please add it to pyproject.toml! :)

@qoft
Copy link
Contributor Author

qoft commented Jun 2, 2023

Sorry about the delay, added wcwidth to the pyproject.toml

@Tired-Fox
Copy link
Contributor

@qoft Shouldn't the dependency go in the project dependencies list?

requires = [... , "wcwidth"]

to

[project]
...
dependencies = [... , "wcwidth"]

bczsalba added a commit that referenced this pull request Feb 24, 2024
InputField in its current form can't support wide characters, but other
things now do. Real length also uses `wcswidth` now on top of stripping
ANSI.

Credit to @qoft with #118.
@bczsalba
Copy link
Owner

Implemented this myself since this PR seems abandoned, thanks for the idea :)

@bczsalba bczsalba closed this Feb 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Chinese text length is miscalculated
3 participants