diff --git a/src/rime/gear/simplifier.cc b/src/rime/gear/simplifier.cc index d7cba581e..f57b077d6 100644 --- a/src/rime/gear/simplifier.cc +++ b/src/rime/gear/simplifier.cc @@ -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_); @@ -253,6 +254,9 @@ void Simplifier::PushBack(const an& original, tips = simplified; comment_formatter_.Apply(&tips); } + if (append_comment_) { + tips = original->comment() + tips; + } } else { text = simplified; if (show_tips) { diff --git a/src/rime/gear/simplifier.h b/src/rime/gear/simplifier.h index 703f18e60..cb622814d 100644 --- a/src/rime/gear/simplifier.h +++ b/src/rime/gear/simplifier.h @@ -42,6 +42,7 @@ class Simplifier : public Filter, TagMatching { string opencc_config_; set excluded_types_; bool show_in_comment_ = false; + bool append_comment_ = false; bool inherit_comment_ = true; Projection comment_formatter_; bool random_ = false;