From 8af548fd3eb3641993a55dc01f2ff4b82bd1d570 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); } }