diff options
author | 2012-09-05 05:08:36 -0700 | |
---|---|---|
committer | 2012-09-05 05:08:36 -0700 | |
commit | 4bdbd254bb9c25630af7549dfc27c1192f6b9e09 (patch) | |
tree | 7ce9621b963ba82f76824c750542f62e6270408f /native/jni/src/proximity_info_state.cpp | |
parent | f619ac6b959569feed126e152af2501918529cd0 (diff) | |
parent | cde005c05ec6b552ec26740b578be12c7d24013b (diff) | |
download | latinime-4bdbd254bb9c25630af7549dfc27c1192f6b9e09.tar.gz latinime-4bdbd254bb9c25630af7549dfc27c1192f6b9e09.tar.xz latinime-4bdbd254bb9c25630af7549dfc27c1192f6b9e09.zip |
am cde005c0: Fix apostrophe issue
* commit 'cde005c05ec6b552ec26740b578be12c7d24013b':
Fix apostrophe issue
Diffstat (limited to 'native/jni/src/proximity_info_state.cpp')
-rw-r--r-- | native/jni/src/proximity_info_state.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/native/jni/src/proximity_info_state.cpp b/native/jni/src/proximity_info_state.cpp index 4c67ea81c..b363dcc36 100644 --- a/native/jni/src/proximity_info_state.cpp +++ b/native/jni/src/proximity_info_state.cpp @@ -395,6 +395,11 @@ float ProximityInfoState::getPointToKeyLength(int inputIndex, int codePoint, flo const int index = inputIndex * mProximityInfo->getKeyCount() + keyId; return min(mDistanceCache[index] * scale, mMaxPointToKeyLength); } + // TODO: Do not hardcode here + // No penalty to ' and - + if (codePoint == '\'' || codePoint == '-') { + return 0; + } // If the char is not a key on the keyboard then return the max length. return MAX_POINT_TO_KEY_LENGTH; } |