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

fix rejected key release resets candidate window #44

Merged
merged 1 commit into from
Sep 12, 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
23 changes: 21 additions & 2 deletions patches/rime.patch
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ index 3ecc012..6bec003 100644
this, "UserDataDir", _("User data dir"),
stringutils::concat(
diff --git a/src/rimestate.cpp b/src/rimestate.cpp
index a8fe4b9..5dbc18f 100644
index a8fe4b9..e180c48 100644
--- a/src/rimestate.cpp
+++ b/src/rimestate.cpp
@@ -11,6 +11,7 @@
Expand All @@ -107,7 +107,26 @@ index a8fe4b9..5dbc18f 100644

std::string RimeState::subMode() {
std::string result;
@@ -440,6 +446,30 @@ void RimeState::updateUI(InputContext *ic, bool keyRelease) {
@@ -226,11 +232,13 @@ void RimeState::keyEvent(KeyEvent &event) {
engine_->instance()->resetCompose(ic);
}

- updateUI(ic, event.isRelease());
- if (!event.isRelease() && !lastSchema.empty() &&
- lastSchema == currentSchema() && ic->inputPanel().empty() &&
- !changedOptions_.empty()) {
- showChangedOptions();
+ if (event.accepted()) {
+ updateUI(ic, event.isRelease());
+ if (!event.isRelease() && !lastSchema.empty() &&
+ lastSchema == currentSchema() && ic->inputPanel().empty() &&
+ !changedOptions_.empty()) {
+ showChangedOptions();
+ }
}
}

@@ -440,6 +448,30 @@ void RimeState::updateUI(InputContext *ic, bool keyRelease) {

void RimeState::release() { session_.reset(); }

Expand Down