mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Fix bug that can cause unexpected off-keyboard chars to appear as suggestions.
Bug: 7050587 Change-Id: I59ea659a411ab966380fadd3f7f9df3f0866192f
This commit is contained in:
parent
58bb1d7dd1
commit
8c220a0aa2
@ -391,11 +391,12 @@ int ProximityInfoState::getDuration(const int index) const {
|
||||
|
||||
float ProximityInfoState::getPointToKeyLength(int inputIndex, int codePoint, float scale) {
|
||||
const int keyId = mProximityInfo->getKeyIndexOf(codePoint);
|
||||
if (keyId >= 0) {
|
||||
if (keyId != NOT_AN_INDEX) {
|
||||
const int index = inputIndex * mProximityInfo->getKeyCount() + keyId;
|
||||
return min(mDistanceCache[index] * scale, mMaxPointToKeyLength);
|
||||
}
|
||||
return 0;
|
||||
// If the char is not a key on the keyboard then return the max length.
|
||||
return MAX_POINT_TO_KEY_LENGTH;
|
||||
}
|
||||
|
||||
int ProximityInfoState::getKeyKeyDistance(int key0, int key1) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user