fix(engine): 全拼合法键入被别名改写后 preedit 不再照搬改写串
This commit is contained in:
1 parent
f73e50b36a
commit
efdea2c14f
2 files changed
+26
-1
No files matched your search
@@ -285,7 +285,13 @@ std::string BuildQuanpinAutocorrectDisplay(const QueryRequest &request)
|
||||
// bit rides along with the legacy switches.
|
||||
if (quanpin::looks_like_syllable_with_jianpin_tail(request.raw_input))
|
||||
{
|
||||
return base;
|
||||
// The typed spelling is legal, but the scheme alias table may still
|
||||
// have re-segmented it into a reading with copied letters (dongua ->
|
||||
// dong'gua, haoyonga -> hao'yong'ga). The dictionary ranks those
|
||||
// readings against the exact one by frequency, yet the preedit must
|
||||
// show the typed letters (PRD R5), so a rewritten base may never
|
||||
// reach it verbatim.
|
||||
return letters_rewritten ? QuanpinLettersWithoutDelimiters(cased) : base;
|
||||
}
|
||||
|
||||
const auto cut = quanpin::autocorrect_cut_detail(folded_input, types);
|
||||
|
||||
Reference in new issue
Block a user