Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/rime/gear/simplifier.cc
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ Simplifier::Simplifier(const Ticket& ticket)
: kTipsNone;
}
config->GetBool(name_space_ + "/show_in_comment", &show_in_comment_);
config->GetBool(name_space_ + "/append_comment", &append_comment_);
config->GetBool(name_space_ + "/inherit_comment", &inherit_comment_);
comment_formatter_.Load(config->GetList(name_space_ + "/comment_format"));
config->GetBool(name_space_ + "/random", &random_);
Expand Down Expand Up @@ -253,6 +254,9 @@ void Simplifier::PushBack(const an<Candidate>& original,
tips = simplified;
comment_formatter_.Apply(&tips);
}
if (append_comment_) {
tips = original->comment() + tips;
}
} else {
text = simplified;
if (show_tips) {
Expand Down
1 change: 1 addition & 0 deletions src/rime/gear/simplifier.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ class Simplifier : public Filter, TagMatching {
string opencc_config_;
set<string> excluded_types_;
bool show_in_comment_ = false;
bool append_comment_ = false;
bool inherit_comment_ = true;
Projection comment_formatter_;
bool random_ = false;
Expand Down