From 64a3aa583f72be608e3e513aebf2c0f028e49346 Mon Sep 17 00:00:00 2001 From: VictoriousRaptor <10308169+VictoriousRaptor@users.noreply.github.com> Date: Thu, 19 Jun 2025 19:29:50 +0800 Subject: [PATCH] Fix Off-by-one in index mapping when consecutive Chinese chars Found by code rabbit --- Flow.Launcher.Infrastructure/PinyinAlphabet.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Flow.Launcher.Infrastructure/PinyinAlphabet.cs b/Flow.Launcher.Infrastructure/PinyinAlphabet.cs index 37b7bb8c3..ffb92a9bf 100644 --- a/Flow.Launcher.Infrastructure/PinyinAlphabet.cs +++ b/Flow.Launcher.Infrastructure/PinyinAlphabet.cs @@ -107,8 +107,8 @@ namespace Flow.Launcher.Infrastructure string translated = _settings.UseDoublePinyin ? ToDoublePin(resultList[i]) : resultList[i]; if (previousIsChinese) { - map.AddNewIndex(i, resultBuilder.Length, translated.Length + 1); resultBuilder.Append(' '); + map.AddNewIndex(i, resultBuilder.Length, translated.Length + 1); resultBuilder.Append(translated); } else