From 3aecbd5adae328aa8c7b296654ab6791db77d169 Mon Sep 17 00:00:00 2001 From: Aleksandras Kostarevas Date: Tue, 30 Jan 2024 19:59:47 +0200 Subject: [PATCH] Fix issue where mOriginatesFromTransformerLM gets lost --- java/src/org/futo/inputmethod/latin/Suggest.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/java/src/org/futo/inputmethod/latin/Suggest.java b/java/src/org/futo/inputmethod/latin/Suggest.java index 30ddacfcc..cea260c29 100644 --- a/java/src/org/futo/inputmethod/latin/Suggest.java +++ b/java/src/org/futo/inputmethod/latin/Suggest.java @@ -440,9 +440,13 @@ public final class Suggest { for (int i = quotesToAppend - 1; i >= 0; --i) { sb.appendCodePoint(Constants.CODE_SINGLE_QUOTE); } - return new SuggestedWordInfo(sb.toString(), wordInfo.mPrevWordsContext, + SuggestedWordInfo result = new SuggestedWordInfo(sb.toString(), wordInfo.mPrevWordsContext, wordInfo.mScore, wordInfo.mKindAndFlags, wordInfo.mSourceDict, wordInfo.mIndexOfTouchPointOfSecondWord, wordInfo.mAutoCommitFirstWordConfidence); + + result.mOriginatesFromTransformerLM = wordInfo.mOriginatesFromTransformerLM; + + return result; } }