Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 93e15471 authored by Jean Chalard's avatar Jean Chalard Committed by Android Git Automerger
Browse files

am 82ddd168: Stop avoiding adding what the user typed to candidates

* commit '82ddd168':
  Stop avoiding adding what the user typed to candidates
parents 082d3f62 82ddd168
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -168,8 +168,8 @@ int Correction::getFinalFreq(const int freq, unsigned short **word, int *wordLen
    const int outputIndex = mTerminalOutputIndex;
    const int inputIndex = mTerminalInputIndex;
    *wordLength = outputIndex + 1;
    if (mProximityInfo->sameAsTyped(mWord, outputIndex + 1) || outputIndex < MIN_SUGGEST_DEPTH) {
        return -1;
    if (outputIndex < MIN_SUGGEST_DEPTH) {
        return NOT_A_FREQUENCY;
    }

    *word = mWord;
+1 −0
Original line number Diff line number Diff line
@@ -172,6 +172,7 @@ static void prof_out(void) {
#define EQUIVALENT_CHAR_WITHOUT_DISTANCE_INFO -2
#define PROXIMITY_CHAR_WITHOUT_DISTANCE_INFO -3
#define NOT_A_INDEX -1
#define NOT_A_FREQUENCY -1

#define KEYCODE_SPACE ' '

+1 −1
Original line number Diff line number Diff line
@@ -335,7 +335,7 @@ inline void UnigramDictionary::onTerminal(const int freq,
    int wordLength;
    unsigned short* wordPointer;
    const int finalFreq = correction->getFinalFreq(freq, &wordPointer, &wordLength);
    if (finalFreq >= 0) {
    if (finalFreq != NOT_A_FREQUENCY) {
        if (!terminalAttributes.isShortcutOnly()) {
            if (addToMasterQueue) {
                addWord(wordPointer, wordLength, finalFreq, masterQueue);