Skip to content

Commit

Permalink
simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
eagleoflqj committed Sep 3, 2023
1 parent e825f7d commit fd1a6dc
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/rime/gear/reverse_lookup_filter.cc
Expand Up @@ -79,11 +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_ && !append_comment_ && cand->comment().empty()) {
if (overwrite_comment_ || cand->comment().empty()) {
phrase->set_comment(codes);
} else if (overwrite_comment_) {
phrase->set_comment(codes);
} else if (append_comment_) {
} else {
phrase->set_comment(cand->comment() + " " + codes);
}
}
Expand Down

0 comments on commit fd1a6dc

Please sign in to comment.