File tree 3 files changed +13
-15
lines changed
3 files changed +13
-15
lines changed Original file line number Diff line number Diff line change @@ -24,9 +24,6 @@ bool Composition::HasFinishedComposition() const {
24
24
Preedit Composition::GetPreedit (const string& full_input, size_t caret_pos,
25
25
const string& caret) const {
26
26
Preedit preedit;
27
- if (empty ()) {
28
- return preedit;
29
- }
30
27
preedit.caret_pos = string::npos;
31
28
size_t start = 0 ;
32
29
size_t end = 0 ;
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ string Context::GetScriptText() const {
32
32
return composition_.GetScriptText ();
33
33
}
34
34
35
- static const string kCaretSymbol (" \xe2\x80\xb8 " );
35
+ static const string kCaretSymbol (" \xe2\x80\xb8 " ); // U+2038 ‸ CARET
36
36
37
37
string Context::GetSoftCursor () const {
38
38
return get_option (" soft_cursor" ) ? kCaretSymbol : string ();
@@ -43,7 +43,7 @@ Preedit Context::GetPreedit() const {
43
43
}
44
44
45
45
bool Context::IsComposing () const {
46
- return !input_.empty ();
46
+ return !input_.empty () || !composition_. empty () ;
47
47
}
48
48
49
49
bool Context::HasMenu () const {
Original file line number Diff line number Diff line change @@ -114,17 +114,17 @@ void Switcher::HighlightNextSchema() {
114
114
```yaml
115
115
schema_list:
116
116
- case: [mode/wubi, mode/wubi_pinyin]
117
- schema: wubi_pinyin
117
+ schema: wubi_pinyin
118
118
- case: [mode/wubi]
119
- schema: wubi86
120
- - case: [mode/default]
121
- schema: pinyin
119
+ schema: wubi86
120
+ - case: [mode/default]
121
+ schema: pinyin
122
122
123
- mode:
124
- wubi: false
125
- wubi_pinyin: false
126
- default: true
127
- ```
123
+ mode:
124
+ wubi: false
125
+ wubi_pinyin: false
126
+ default: true
127
+ ```
128
128
*/
129
129
130
130
static an<ConfigValue> ParseSchemaListEntry (Config* config,
@@ -224,7 +224,8 @@ void Switcher::OnSelect(Context* ctx) {
224
224
void Switcher::RefreshMenu () {
225
225
Composition& comp = context_->composition ();
226
226
if (comp.empty ()) {
227
- context_->set_input (" " ); // make context_->IsComposing() == true
227
+ // no longer need this to make context_->IsComposing() == true
228
+ // context_->set_input(" ");
228
229
Segment seg (0 , 0 ); // empty range
229
230
seg.prompt = caption_;
230
231
comp.AddSegment (seg);
You can’t perform that action at this time.
0 commit comments