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 <liumeo@pku.edu.cn>
  • Loading branch information
2 people authored and graphemecluster committed Sep 3, 2023
1 parent 56320a7 commit 8e18f98
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/rime/gear/reverse_lookup_filter.cc
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 8e18f98

Please sign in to comment.