From b010f0c03a7115e5c3344c1a9135ebb0b51d40a5 Mon Sep 17 00:00:00 2001 From: ksqsf Date: Sun, 3 Sep 2023 20:08:17 +0800 Subject: [PATCH] Fix a regression in reverse_lookup_filter introduced in #699 (#701) --------- Co-authored-by: Qijia Liu --- src/rime/gear/reverse_lookup_filter.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rime/gear/reverse_lookup_filter.cc b/src/rime/gear/reverse_lookup_filter.cc index 70b144d9b..0925aa52f 100644 --- a/src/rime/gear/reverse_lookup_filter.cc +++ b/src/rime/gear/reverse_lookup_filter.cc @@ -79,9 +79,9 @@ void ReverseLookupFilter::Process(const an& cand) { if (rev_dict_->ReverseLookup(phrase->text(), &codes)) { comment_formatter_.Apply(&codes); if (!codes.empty()) { - if (overwrite_comment_) { + if (overwrite_comment_ || cand->comment().empty()) { phrase->set_comment(codes); - } else if (append_comment_) { + } else { phrase->set_comment(cand->comment() + " " + codes); } }