1
0
mirror of https://github.com/emilk/egui.git synced 2026-06-26 22:53:14 -04:00

Rework TextEdit arrow navigation to handle Unicode graphemes (#5812)

* [x] I have followed the instructions in the PR template

Previously, navigating text in `TextEdit` with Ctrl + left/right arrow
would jump inside words that contained combining characters (i.e.
diacritics). This PR introduces new dependency of `unicode-segmentation`
to handle grapheme encoding. The new implementation ignores whitespace
and other separators such as `-` (dash) between words, but respects `_`
(underscore).

---------

Co-authored-by: lucasmerlin <hi@lucasmerlin.me>
This commit is contained in:
MStarha
2025-04-22 17:44:10 +02:00
committed by GitHub
parent a0f072ab1e
commit 69b9f0eede
5 changed files with 76 additions and 19 deletions

View File

@@ -1285,6 +1285,7 @@ dependencies = [
"profiling",
"ron",
"serde",
"unicode-segmentation",
]
[[package]]