From bf50e4fa7ee6ed027fe67d83cbce4d64b626aa17 Mon Sep 17 00:00:00 2001 From: Lukhnos Liu Date: Mon, 10 Sep 2012 19:12:25 -0700 Subject: [PATCH] Fix a punctuation bug in Plain Bopomofo mode. Bopomofo keyboard layout-specific punctuation keys were not handeled properly. The candidates are now correctly collected. --- Source/InputMethodController.mm | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Source/InputMethodController.mm b/Source/InputMethodController.mm index d7ad2119..c17674e5 100644 --- a/Source/InputMethodController.mm +++ b/Source/InputMethodController.mm @@ -964,8 +964,14 @@ public: } [self updateClientComposingBuffer:client]; - if (_inputMode == kPlainBopomofoModeIdentifier) { - [self _showCandidateWindowUsingVerticalMode:useVerticalMode client:client]; + if (_inputMode == kPlainBopomofoModeIdentifier && _bpmfReadingBuffer->isEmpty()) { + [self collectCandidates]; + if ([_candidates count] == 1) { + [self commitComposition:client]; + } + else { + [self _showCandidateWindowUsingVerticalMode:useVerticalMode client:client]; + } } return YES; @@ -983,7 +989,7 @@ public: } [self updateClientComposingBuffer:client]; - if (_inputMode == kPlainBopomofoModeIdentifier) { + if (_inputMode == kPlainBopomofoModeIdentifier && _bpmfReadingBuffer->isEmpty()) { [self collectCandidates]; if ([_candidates count] == 1) { [self commitComposition:client];