Skip to content

Commit 0bd1b21

Browse files
committed
fix: incorrect words not marked as such in nospace
closes #8141
1 parent e976864 commit 0bd1b21

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

frontend/src/ts/input/handlers/insert-text.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,12 +209,16 @@ export async function onInsertText(options: OnInsertTextParams): Promise<void> {
209209
// this needs to be called after event logging
210210
WeakSpot.updateScore(data, correct);
211211

212+
const commitCorrect = noSpaceForce
213+
? testInput + data === currentWord
214+
: correct;
215+
212216
// going to next word
213217
let increasedWordIndex: null | boolean = null;
214218
let lastBurst: null | number = null;
215219
if (shouldGoToNextWord) {
216220
const result = await goToNextWord({
217-
correctInsert: correct,
221+
correctInsert: commitCorrect,
218222
isCompositionEnding: isCompositionEnding === true,
219223
zenNewline: charIsNewline && Config.mode === "zen",
220224
now,

0 commit comments

Comments
 (0)