1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-26 19:48:01 +02:00

Improved right-cursor movement over utf8 codepoints

This commit is contained in:
Brian Fiete 2024-01-22 08:39:53 -05:00
parent 04f1802303
commit f96de4722e
3 changed files with 41 additions and 4 deletions

View file

@ -5366,7 +5366,7 @@ namespace IDE.ui
String curLineStr = scope String();
GetLineText(line, curLineStr);
int32 lineEnd = (int32)curLineStr.Length;
int32 lineEnd = (int32)curLineStr.NumCodePoints;
mVirtualCursorPos.ValueRef.mColumn = (.)Math.Min(mVirtualCursorPos.Value.mColumn, Math.Max(virtualEnd, lineEnd));
}