Skip to content
This repository has been archived by the owner on Nov 30, 2024. It is now read-only.

rime: set _linear by default #42

Merged
merged 1 commit into from
Aug 4, 2024
Merged
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
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;