Skip to content

Commit

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

---------

Co-authored-by: Qijia Liu <[email protected]>
  • Loading branch information
2 people authored and groverlynn committed Sep 27, 2023
1 parent a71a8f6 commit b010f0c
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 b010f0c

Please sign in to comment.