Zonble: UPR265 to let Shift+Space commit current comp. buffer.
This commit is contained in:
parent
e7dcbe7e91
commit
e77f253ed6
|
@ -364,7 +364,14 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot";
|
||||||
// if the spacebar is NOT set to be a selection key
|
// if the spacebar is NOT set to be a selection key
|
||||||
if ([input isShiftHold] || !Preferences.chooseCandidateUsingSpace) {
|
if ([input isShiftHold] || !Preferences.chooseCandidateUsingSpace) {
|
||||||
if (_builder->cursorIndex() >= _builder->length()) {
|
if (_builder->cursorIndex() >= _builder->length()) {
|
||||||
[self clear];
|
if ([state isKindOfClass:[InputStateNotEmpty class]]) {
|
||||||
|
NSString *composingBuffer = [(InputStateNotEmpty *)state composingBuffer];
|
||||||
|
if ([composingBuffer length]) {
|
||||||
|
InputStateCommitting *committing = [[InputStateCommitting alloc] initWithPoppedText:composingBuffer];
|
||||||
|
stateCallback(committing);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
[self clear];
|
||||||
InputStateCommitting *committing = [[InputStateCommitting alloc] initWithPoppedText:@" "];
|
InputStateCommitting *committing = [[InputStateCommitting alloc] initWithPoppedText:@" "];
|
||||||
stateCallback(committing);
|
stateCallback(committing);
|
||||||
InputStateEmpty *empty = [[InputStateEmpty alloc] init];
|
InputStateEmpty *empty = [[InputStateEmpty alloc] init];
|
||||||
|
|
Loading…
Reference in New Issue