From 8d15d6b1818dd9cb1fe22e770433d53d8e1ba142 Mon Sep 17 00:00:00 2001 From: Miodec Date: Thu, 3 Jul 2025 19:41:00 +0200 Subject: [PATCH] fix(indicate typos): input sometimes being blocked in the middle of a word --- frontend/src/ts/controllers/input-controller.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/src/ts/controllers/input-controller.ts b/frontend/src/ts/controllers/input-controller.ts index 65a109233..f23622e00 100644 --- a/frontend/src/ts/controllers/input-controller.ts +++ b/frontend/src/ts/controllers/input-controller.ts @@ -729,10 +729,13 @@ function handleChar( const newActiveTop = activeWord?.offsetTop; //stop the word jump by slicing off the last character, update word again + // dont do it in replace typos, because it might trigger in the middle of a wrd + // when using non monospace fonts if ( activeWordTopBeforeJump < newActiveTop && !TestUI.lineTransition && - TestInput.input.current.length > 1 + TestInput.input.current.length > 1 && + Config.indicateTypos !== "replace" ) { if (Config.mode === "zen") { if (!Config.showAllLines) void TestUI.lineJump(activeWordTopBeforeJump);