Skip to content

Commit

Permalink
Fix a regression in reverse_lookup_filter introduced in #699 (#701)
Browse files Browse the repository at this point in the history
---------

Co-authored-by: Qijia Liu <liumeo@pku.edu.cn>
  • Loading branch information
ksqsf and eagleoflqj authored Sep 3, 2023
1 parent f079c3c commit 8af548f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/rime/gear/reverse_lookup_filter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ void ReverseLookupFilter::Process(const an<Candidate>& 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);
}
}
Expand Down

0 comments on commit 8af548f

Please sign in to comment.