From 8e0ff3b002cac416a60ee2ae6e9aa240b235338b Mon Sep 17 00:00:00 2001 From: a8568730 Date: Wed, 18 Nov 2020 11:10:24 +0800 Subject: [PATCH] * ScriptTranslation::Peek shows spellings when always_show_comments turns on or spelling isn't equal to preedit. --- src/rime/gear/script_translator.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/rime/gear/script_translator.cc b/src/rime/gear/script_translator.cc index 00b4f1104..6674c5ee6 100644 --- a/src/rime/gear/script_translator.cc +++ b/src/rime/gear/script_translator.cc @@ -447,7 +447,9 @@ an ScriptTranslation::Peek() { } if (candidate_->comment().empty()) { auto spelling = syllabifier_->GetOriginalSpelling(*candidate_); - if (!spelling.empty() && spelling != candidate_->preedit()) { + if (!spelling.empty() && + (translator_->always_show_comments() || + spelling != candidate_->preedit())) { candidate_->set_comment(/*quote_left + */spelling/* + quote_right*/); } }