applying correction after the inital move

This commit is contained in:
Jack 2020-09-23 23:29:13 +01:00
parent 8dd37e4d91
commit 9c23c28e00

View file

@ -3706,6 +3706,12 @@ function movePaceCaret(expectedStepEnd) {
$("#paceCaret").removeClass("hidden");
}
try {
paceCaret.currentLetterIndex++;
if (paceCaret.currentLetterIndex >= wordsList[paceCaret.currentWordIndex].length) {
//go to the next word
paceCaret.currentLetterIndex = -1;
paceCaret.currentWordIndex++;
}
if (paceCaret.correction < 0) {
// paceCaret.correction++;
@ -3730,14 +3736,7 @@ function movePaceCaret(expectedStepEnd) {
}
paceCaret.correction--;
}
} else {
paceCaret.currentLetterIndex++;
if (paceCaret.currentLetterIndex >= wordsList[paceCaret.currentWordIndex].length) {
//go to the next word
paceCaret.currentLetterIndex = -1;
paceCaret.currentWordIndex++;
}
}
}
} catch (e) {
//out of words
paceCaret = null;