fixed ui bug when backspacing in nospace

disabled spacing in nospace
This commit is contained in:
Miodec 2021-12-23 00:12:21 +01:00
parent ec2293ff63
commit 5710cd5bef

View file

@ -75,18 +75,16 @@ function backspaceToPrevious() {
return;
}
TestUI.updateWordElement();
TestLogic.input.current = TestLogic.input.popHistory();
TestLogic.corrected.popHistory();
if (Config.funbox === "nospace") {
TestLogic.input.current = TestLogic.input.current.slice(0, -1);
}
TestLogic.words.decreaseCurrentIndex();
TestUI.setCurrentWordElementIndex(TestUI.currentWordElementIndex - 1);
TestUI.updateActiveElement(true);
Funbox.toggleScript(TestLogic.words.getCurrent());
TestUI.updateWordElement();
Caret.updatePosition();
Replay.addReplayEvent("backWord");
@ -343,6 +341,7 @@ function handleChar(char, charIndex) {
}
if (char !== "\n" && char !== "\t" && /\s/.test(char)) {
if (Config.funbox === "nospace" || Config.funbox === "arrows") return;
handleSpace();
//insert space for expert and master or strict space,