Skip to content

Commit 89f7ae3

Browse files
committed
patch librime
since rime/librime#672 hasn't got merged
1 parent 7a9a3ed commit 89f7ae3

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ RUN mkdir sdk && \
2525
# Fetch Trime submodule and build librime from it
2626
RUN cd /app && \
2727
git submodule update --init --recursive && \
28+
# patch librime
29+
./patch-librime && \
2830
cd trime && \
2931
git apply /app/trime.patch && \
3032
cd app/src/main/jni && \

patch-librime

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
3+
# https://github.com/rime/librime/pull/672
4+
patch trime/app/src/main/jni/librime/src/rime/gear/punctuator.cc - << EOF
5+
@@ -72,7 +72,8 @@ ProcessResult Punctuator::ProcessKeyEvent(const KeyEvent& key_event) {
6+
if (!use_space_ && ch == XK_space && ctx->IsComposing()) {
7+
return kNoop;
8+
}
9+
- if (ch == '.' || ch == ':') { // 3.14, 12:30
10+
+ if ((ch == '.' || ch == ':' || ch == ',' || ch == '\'') &&
11+
+ !(ctx->IsComposing())) { // 3.14 12:30 4'999,95
12+
const CommitHistory& history(ctx->commit_history());
13+
if (!history.empty()) {
14+
const CommitRecord& cr(history.back());
15+
16+
EOF

0 commit comments

Comments
 (0)