Skip to content
Snippets Groups Projects
Commit 6d783021 authored by satok's avatar satok
Browse files

Fix last excessive char correction handling

Change-Id: Id1d46cd96e041fbbbee995093ef8ca56daa3b383
parent 890d10bd
No related branches found
No related tags found
No related merge requests found
...@@ -212,6 +212,12 @@ Correction::CorrectionType Correction::processCharAndCalcState( ...@@ -212,6 +212,12 @@ Correction::CorrectionType Correction::processCharAndCalcState(
const int32_t c, const bool isTerminal) { const int32_t c, const bool isTerminal) {
if (mNeedsToTraverseAllNodes || isQuote(c)) { 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); return processSkipChar(c, isTerminal);
} }
...@@ -312,7 +318,6 @@ Correction::CorrectionType Correction::processCharAndCalcState( ...@@ -312,7 +318,6 @@ Correction::CorrectionType Correction::processCharAndCalcState(
&& mExcessivePos >= 0 && (mInputIndex == mInputLength - 2); && mExcessivePos >= 0 && (mInputIndex == mInputLength - 2);
const bool isSameAsUserTypedLength = (mInputLength == mInputIndex + 1) || mLastCharExceeded; const bool isSameAsUserTypedLength = (mInputLength == mInputIndex + 1) || mLastCharExceeded;
if (mLastCharExceeded) { if (mLastCharExceeded) {
// TODO: Decrement mExcessiveCount if next char is matched word.
++mExcessiveCount; ++mExcessiveCount;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment