diff options
author | 2011-08-19 18:22:28 +0900 | |
---|---|---|
committer | 2011-08-19 18:31:43 +0900 | |
commit | 6d78302155d8a6437ab6541d93ddb42bf21e0a61 (patch) | |
tree | a98eef135c02904e02cc15925b340114cee7a828 /native/src | |
parent | 890d10bd1ebdfe7222853010d0ecdb00de54d801 (diff) | |
download | latinime-6d78302155d8a6437ab6541d93ddb42bf21e0a61.tar.gz latinime-6d78302155d8a6437ab6541d93ddb42bf21e0a61.tar.xz latinime-6d78302155d8a6437ab6541d93ddb42bf21e0a61.zip |
Fix last excessive char correction handling
Change-Id: Id1d46cd96e041fbbbee995093ef8ca56daa3b383
Diffstat (limited to 'native/src')
-rw-r--r-- | native/src/correction.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/native/src/correction.cpp b/native/src/correction.cpp index d366d254b..fb160149d 100644 --- a/native/src/correction.cpp +++ b/native/src/correction.cpp @@ -212,6 +212,12 @@ Correction::CorrectionType Correction::processCharAndCalcState( const int32_t c, const bool isTerminal) { if (mNeedsToTraverseAllNodes || isQuote(c)) { + if (mLastCharExceeded > 0 && mInputIndex == mInputLength - 1 + && mProximityInfo->getMatchedProximityId(mInputIndex, c, false) + == ProximityInfo::SAME_OR_ACCENTED_OR_CAPITALIZED_CHAR) { + mLastCharExceeded = false; + --mExcessiveCount; + } return processSkipChar(c, isTerminal); } @@ -312,7 +318,6 @@ Correction::CorrectionType Correction::processCharAndCalcState( && mExcessivePos >= 0 && (mInputIndex == mInputLength - 2); const bool isSameAsUserTypedLength = (mInputLength == mInputIndex + 1) || mLastCharExceeded; if (mLastCharExceeded) { - // TODO: Decrement mExcessiveCount if next char is matched word. ++mExcessiveCount; } |