-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: enable Unicode separators and caret motions
As the runtime is going to support Unicode installation locations and build directories, some UTF-8 text is going to reach the Lua side of the project. This includes the script path, the user path, any paths yielded from file searches and also imported character names from accounts. Care needs to be taken in many places where string operations are performed as no longer does a byte necessarily correspond to a single character and anything that truncates, reverses or otherwise slices strings could need an audit. This change fixes cursor movement in `EditControl`s with the arrow keys as those historically used string matching and byte offsets. It also ensures that the use of arbitrary Unicode codepoints as decimal and thousands separators works correctly as the previous code used unaware reversing and slicing.
- Loading branch information
Showing
2 changed files
with
15 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters