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 TextEdit's character limit #3173

Merged
merged 1 commit into from
Jul 26, 2023
Merged

Fix TextEdit's character limit #3173

merged 1 commit into from
Jul 26, 2023

Conversation

Serverator
Copy link
Contributor

Objective

Fixes a issue with TextEdit's character limit. Currently, the character limit is using bytes instead of chars to count the existing length of the text, which causes incorrect behavior with non-ASCII text. This small PR fixes the issue.

Issue example

If I set a character limit to 8, TextEdit will not allow me to write anything after

  • "Language" (8 bytes, 8 chars)
  • "Морж" (8 bytes, 4 chars)
  • "冰淇淋" (9 bytes, 3 chars)

While still not being at the character limit.

@Serverator Serverator changed the title Fix for character limit Fix TextEdit's character limit Jul 23, 2023
Copy link
Collaborator

@Wumpf Wumpf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense! Wondering if there's more of these hidden

@Wumpf Wumpf added bug Something is broken egui labels Jul 26, 2023
@Wumpf Wumpf merged commit 339b758 into emilk:master Jul 26, 2023
17 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is broken egui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants