aboutsummaryrefslogtreecommitdiffstats
path: root/native/src/correction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'native/src/correction.cpp')
-rw-r--r--native/src/correction.cpp7
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;
}