diff --git a/web/src/engine/predictive-text/worker-thread/src/main/predict-helpers.ts b/web/src/engine/predictive-text/worker-thread/src/main/predict-helpers.ts index 9739adba856..2f480e7535c 100644 --- a/web/src/engine/predictive-text/worker-thread/src/main/predict-helpers.ts +++ b/web/src/engine/predictive-text/worker-thread/src/main/predict-helpers.ts @@ -965,9 +965,11 @@ export function predictionAutoSelect(suggestionDistribution: CorrectionPredictio const keepOption = suggestionDistribution[0].prediction.sample as Outcome; if(keepOption.tag == 'keep' && keepOption.matchesModel) { - // Auto-select it for auto-acceptance; we don't correct away from perfectly-valid - // lexical entries, even if they are comparatively low-frequency. - keepOption.autoAccept = true; + // Do not auto-select 'keep' suggestions'; there's no need to apply them. + // + // Do, however, block auto-selection of any other suggestions if we would + // have auto-selected the 'keep'; even if it is comparatively unlikely / + // low-frequency, we 'keep' the current context. return; } else if(suggestionDistribution.length == 1) { return; diff --git a/web/src/engine/src/interfaces/prediction/predictionContext.ts b/web/src/engine/src/interfaces/prediction/predictionContext.ts index 97182a9bf16..b374f504fba 100644 --- a/web/src/engine/src/interfaces/prediction/predictionContext.ts +++ b/web/src/engine/src/interfaces/prediction/predictionContext.ts @@ -266,7 +266,7 @@ export class PredictionContext extends EventEmitter { this._revertSuggestion = s as Reversion; } - if (this.langProcessor.mayAutoCorrect && s.autoAccept && !this.selected) { + if (this.langProcessor.mayAutoCorrect && s.autoAccept && !this.selected && s.tag != 'keep') { this.selected = s; } }