Skip to content

Commit 8d15d6b

Browse files
committed
fix(indicate typos): input sometimes being blocked in the middle of a word
1 parent 9e7740a commit 8d15d6b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

frontend/src/ts/controllers/input-controller.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -729,10 +729,13 @@ function handleChar(
729729

730730
const newActiveTop = activeWord?.offsetTop;
731731
//stop the word jump by slicing off the last character, update word again
732+
// dont do it in replace typos, because it might trigger in the middle of a wrd
733+
// when using non monospace fonts
732734
if (
733735
activeWordTopBeforeJump < newActiveTop &&
734736
!TestUI.lineTransition &&
735-
TestInput.input.current.length > 1
737+
TestInput.input.current.length > 1 &&
738+
Config.indicateTypos !== "replace"
736739
) {
737740
if (Config.mode === "zen") {
738741
if (!Config.showAllLines) void TestUI.lineJump(activeWordTopBeforeJump);

0 commit comments

Comments
 (0)