Fix foreach runes bug with unicode surrogate pairs (#3894)

This commit is contained in:
Thomas Nind
2025-01-12 17:05:52 +00:00
committed by GitHub
parent 7676f89e39
commit 81ad695ef7
2 changed files with 13 additions and 1 deletions

View File

@@ -2124,7 +2124,7 @@ public class TextFormatter
var start = string.Empty;
var i = 0;
foreach (Rune c in text)
foreach (Rune c in text.EnumerateRunes ())
{
if (c == hotKeySpecifier && i == hotPos)
{