fix(indicate typos): input sometimes being blocked in the middle of a word

This commit is contained in:
Miodec 2025-07-03 19:41:00 +02:00
parent 9e7740a330
commit 8d15d6b181

View file

@ -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);