Skip to content

Commit 816e14b

Browse files
committed
resolve conflicts
1 parent 978cdae commit 816e14b

File tree

5 files changed

+20
-15
lines changed

5 files changed

+20
-15
lines changed

src/rime/gear/ascii_composer.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ AsciiComposer::~AsciiComposer() {
5656
}
5757

5858
ProcessResult AsciiComposer::ProcessKeyEvent(const KeyEvent& key_event) {
59-
if ((key_event.shift() && key_event.ctrl()) ||
60-
key_event.alt() || key_event.hyper() || key_event.super()) {
59+
if ((key_event.shift() && key_event.ctrl()) || key_event.alt() ||
60+
key_event.hyper() || key_event.super()) {
6161
shift_key_pressed_ = ctrl_key_pressed_ = false;
6262
return kNoop;
6363
}

src/rime/gear/editor.cc

+3-4
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,9 @@ ProcessResult Editor::ProcessKeyEvent(const KeyEvent& key_event) {
5656
}
5757
}
5858
if (char_handler_ && !key_event.ctrl() && !key_event.alt() &&
59-
!key_event.super() && !key_event.hyper() &&
60-
ch > 0x20 && ch < 0x7f) {
61-
DLOG(INFO) << "input char: '" << (char)ch << "', " << ch
62-
<< ", '" << key_event.repr() << "'";
59+
!key_event.super() && !key_event.hyper() && ch > 0x20 && ch < 0x7f) {
60+
DLOG(INFO) << "input char: '" << (char)ch << "', " << ch << ", '"
61+
<< key_event.repr() << "'";
6362
return RIME_THIS_CALL(char_handler_)(ctx, ch);
6463
}
6564
// not handled

src/rime/gear/punctuator.cc

+9-3
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ ProcessResult Punctuator::ProcessKeyEvent(const KeyEvent& key_event) {
7272
if (!use_space_ && ch == XK_space && ctx->IsComposing()) {
7373
return kNoop;
7474
}
75-
if (ch == '.' || ch == ':' || ch == ',' || ch == '\'') { // 3.14 12:30 4'999,95
75+
if (ch == '.' || ch == ':' || ch == ',' ||
76+
ch == '\'') { // 3.14 12:30 4'999,95
7677
const CommitHistory& history(ctx->commit_history());
7778
if (!history.empty()) {
7879
const CommitRecord& cr(history.back());
@@ -210,8 +211,13 @@ an<Candidate> CreatePunctCandidate(const string& punct,
210211
bool is_half_shape_kana = (ch >= 0xFF61 && ch <= 0xFF9F);
211212
bool is_hangul = (ch >= 0x3131 && ch <= 0x3164);
212213
bool is_half_shape_hangul = (ch >= 0xFFA0 && ch <= 0xFFDC);
213-
bool is_full_shape_narrow_symbol = ((ch >= 0x3008 && ch <= 0x300B) || (ch >= 0x3018 && ch <= 0x301B) || ch == 0xFF5F || ch == 0xFF60 || (ch >= 0xFFE0 && ch <= 0xFFE6));
214-
bool is_narrow_symbol = (ch == 0x00A2 || ch == 0x00A3 || ch == 0x00A5 || ch == 0x00A6 || ch == 0x00AC || ch == 0x00AF || ch == 0x20A9 || (ch >= 0x27E6 && ch <= 0x27ED) || ch == 0x2985 || ch == 0x2986);
214+
bool is_full_shape_narrow_symbol =
215+
((ch >= 0x3008 && ch <= 0x300B) || (ch >= 0x3018 && ch <= 0x301B) ||
216+
ch == 0xFF5F || ch == 0xFF60 || (ch >= 0xFFE0 && ch <= 0xFFE6));
217+
bool is_narrow_symbol =
218+
(ch == 0x00A2 || ch == 0x00A3 || ch == 0x00A5 || ch == 0x00A6 ||
219+
ch == 0x00AC || ch == 0x00AF || ch == 0x20A9 ||
220+
(ch >= 0x27E6 && ch <= 0x27ED) || ch == 0x2985 || ch == 0x2986);
215221
bool is_half_shape_wide_symbol = (ch >= 0xFFE8 && ch <= 0xFFEE);
216222
bool is_wide_symbol = ((ch >= 0x2190 && ch <= 0x2193) || ch == 0x2502 ||
217223
ch == 0x25A0 || ch == 0x25CB);

src/rime/gear/selector.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ inline static bool is_linear_layout(Context* ctx) {
116116
}
117117

118118
ProcessResult Selector::ProcessKeyEvent(const KeyEvent& key_event) {
119-
if (key_event.release() || key_event.alt() ||
120-
key_event.hyper() || key_event.super())
119+
if (key_event.release() || key_event.alt() || key_event.hyper() ||
120+
key_event.super())
121121
return kNoop;
122122
Context* ctx = engine_->context();
123123
if (ctx->composition().empty())

src/rime/key_event.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@
88
#ifndef RIME_KEY_EVENT_H_
99
#define RIME_KEY_EVENT_H_
1010

11-
#include <iostream>
1211
#include <rime/common.h>
1312
#include <rime/key_table.h>
13+
#include <iostream>
1414

1515
namespace rime {
1616

1717
class KeyEvent {
18-
public:
18+
public:
1919
KeyEvent() = default;
2020
KeyEvent(int keycode, int modifier)
2121
: keycode_(keycode), modifier_(modifier) {}
@@ -51,14 +51,14 @@ class KeyEvent {
5151
return modifier_ < other.modifier_;
5252
}
5353

54-
private:
54+
private:
5555
int keycode_ = 0;
5656
int modifier_ = 0;
5757
};
5858

5959
// 按鍵序列
6060
class KeySequence : public vector<KeyEvent> {
61-
public:
61+
public:
6262
KeySequence() = default;
6363
RIME_API KeySequence(const string& repr);
6464

0 commit comments

Comments
 (0)