Fix a punctuation bug in Plain Bopomofo mode.

Bopomofo keyboard layout-specific punctuation keys were not handeled
properly. The candidates are now correctly collected.
This commit is contained in:
Lukhnos Liu 2012-09-10 19:12:25 -07:00
parent 71921b848a
commit bf50e4fa7e
1 changed files with 9 additions and 3 deletions

View File

@ -964,8 +964,14 @@ public:
} }
[self updateClientComposingBuffer:client]; [self updateClientComposingBuffer:client];
if (_inputMode == kPlainBopomofoModeIdentifier) { if (_inputMode == kPlainBopomofoModeIdentifier && _bpmfReadingBuffer->isEmpty()) {
[self _showCandidateWindowUsingVerticalMode:useVerticalMode client:client]; [self collectCandidates];
if ([_candidates count] == 1) {
[self commitComposition:client];
}
else {
[self _showCandidateWindowUsingVerticalMode:useVerticalMode client:client];
}
} }
return YES; return YES;
@ -983,7 +989,7 @@ public:
} }
[self updateClientComposingBuffer:client]; [self updateClientComposingBuffer:client];
if (_inputMode == kPlainBopomofoModeIdentifier) { if (_inputMode == kPlainBopomofoModeIdentifier && _bpmfReadingBuffer->isEmpty()) {
[self collectCandidates]; [self collectCandidates];
if ([_candidates count] == 1) { if ([_candidates count] == 1) {
[self commitComposition:client]; [self commitComposition:client];