We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent de4700e commit d0bf9f2Copy full SHA for d0bf9f2
src/rime/gear/script_translator.cc
@@ -569,6 +569,7 @@ inline static bool prefer_user_phrase(
569
}
570
571
bool ScriptTranslation::PrepareCandidate() {
572
+iter_incremented:
573
if (exhausted()) {
574
candidate_source_ = kUninitialized;
575
candidate_ = nullptr;
@@ -628,6 +629,10 @@ bool ScriptTranslation::PrepareCandidate() {
628
629
return true;
630
} else if (phrase_code_length > 0) {
631
DictEntryIterator& iter = phrase_iter_->second;
632
+ if (iter.exhausted()) {
633
+ ++phrase_iter_;
634
+ goto iter_incremented;
635
+ }
636
const auto& entry = iter.Peek();
637
DLOG(INFO) << "phrase '" << entry->text
638
<< "', code length: " << phrase_code_length;
0 commit comments