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

fix(examples): changed user_input example to work with multi-byte unicode chars #1069

Merged
merged 2 commits into from
Apr 27, 2024

Conversation

OkieOth
Copy link
Contributor

@OkieOth OkieOth commented Apr 26, 2024

This is the proposed solution for issue #1068. It solves the bug in the user_input example with multi-byte UTF-8 characters as input.

@OkieOth OkieOth changed the title changed user_input example to work with multi-byte unicode chars fix issue #1068: changed user_input example to work with multi-byte unicode chars Apr 26, 2024
@kdheepak kdheepak changed the title fix issue #1068: changed user_input example to work with multi-byte unicode chars fix: changed user_input example to work with multi-byte unicode chars Apr 26, 2024
@kdheepak kdheepak changed the title fix: changed user_input example to work with multi-byte unicode chars fix(examples): changed user_input example to work with multi-byte unicode chars Apr 26, 2024
@joshka
Copy link
Member

joshka commented Apr 27, 2024

I changed this a bit, to instead calculate the byte index and use that to insert. There's still a bug with displaying double width characters however.

@joshka joshka merged commit 4392759 into ratatui-org:main Apr 27, 2024
32 of 33 checks passed
joshka added a commit to nowNick/ratatui that referenced this pull request May 24, 2024
…code chars (ratatui-org#1069)

This is the proposed solution for issue ratatui-org#1068. It solves the bug in the
user_input example with multi-byte UTF-8 characters as input.

Fixes: ratatui-org#1068

---------

Co-authored-by: Josh McKinney <joshka@users.noreply.github.com>
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.

None yet

2 participants