-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfix_input.patch
More file actions
37 lines (33 loc) · 1.16 KB
/
fix_input.patch
File metadata and controls
37 lines (33 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
From 0c94db4f99814164140ae839c86c9eec60d6d12f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9C=BD=E6=9C=BD=E6=9C=BD=E6=9C=BD=E6=9C=BD?=
<694253220@qq.com>
Date: Sun, 24 Aug 2025 22:19:39 +0800
Subject: [PATCH] fix missing character bug
---
src/rime/gear/editor.cc | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/src/rime/gear/editor.cc b/src/rime/gear/editor.cc
index 37b3dda6..511a2fe3 100644
--- a/src/rime/gear/editor.cc
+++ b/src/rime/gear/editor.cc
@@ -44,10 +44,17 @@ Editor::Editor(const Ticket& ticket, bool auto_commit)
}
ProcessResult Editor::ProcessKeyEvent(const KeyEvent& key_event) {
- if (key_event.release())
- return kRejected;
int ch = key_event.keycode();
Context* ctx = engine_->context();
+
+ if (key_event.release()) {
+ if (ctx->IsComposing() && !key_event.ctrl() && !key_event.alt() &&
+ !key_event.super() && ch > 0x20 && ch < 0x7f) {
+ return kAccepted;
+ } else {
+ return kRejected;
+ }
+ }
if (ctx->IsComposing()) {
auto result = KeyBindingProcessor::ProcessKeyEvent(key_event, ctx, 0,
FallbackOptions::All);
--
2.51.0