Skip to content

Commit

Permalink
rime: set _linear by default (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
ksqsf authored Aug 4, 2024
1 parent 1b6044b commit 0c29936
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions patches/rime.patch
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,21 @@ index 6c96898..a52b87a 100644
bool hasAction(const CandidateWord &candidate) const override;
std::vector<CandidateAction>
candidateActions(const CandidateWord &candidate) const override;
diff --git a/src/rimestate.cpp b/src/rimestate.cpp
index a8fe4b9..c54100c 100644
--- a/src/rimestate.cpp
+++ b/src/rimestate.cpp
@@ -79,7 +79,12 @@ void RimeState::clear() {
}
}

-void RimeState::activate() { maybeSyncProgramNameToSession(); }
+void RimeState::activate() {
+ maybeSyncProgramNameToSession();
+ if (session_) {
+ engine_->api()->set_option(session_->id(), "_linear", true);
+ }
+}

std::string RimeState::subMode() {
std::string result;

0 comments on commit 0c29936

Please sign in to comment.