diff --git a/java/src/org/futo/inputmethod/latin/xlm/LanguageModelFacilitator.kt b/java/src/org/futo/inputmethod/latin/xlm/LanguageModelFacilitator.kt index 5c48002d2..1462a3b95 100644 --- a/java/src/org/futo/inputmethod/latin/xlm/LanguageModelFacilitator.kt +++ b/java/src/org/futo/inputmethod/latin/xlm/LanguageModelFacilitator.kt @@ -237,19 +237,21 @@ public class LanguageModelFacilitator( computationSemaphore.acquire() - inputLogic.mWordComposer.setAutoCorrection(null) - - if(values.composedData.mTypedWord.length > BinaryDictionary.DICTIONARY_MAX_WORD_LENGTH) { - inputLogic.mSuggestionStripViewAccessor.setNeutralSuggestionStrip() - } - try { + inputLogic.mWordComposer.setAutoCorrection(null) + + if(values.composedData.mTypedWord.length > BinaryDictionary.DICTIONARY_MAX_WORD_LENGTH) { + inputLogic.mSuggestionStripViewAccessor.setNeutralSuggestionStrip() + return + } + var transformerWeight = context.getSetting(BinaryDictTransformerWeightSetting) val holder = AsyncResultHolder("Suggest") + inputLogic.getSuggestedWords( settings.current, - keyboardSwitcher.keyboard, + keyboardSwitcher.keyboard ?: return, keyboardSwitcher.keyboardShiftMode, values.inputStyle, SuggestedWords.NOT_A_SEQUENCE_NUMBER