mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-11-17 22:29:52 +08:00
applying correction after the inital move
This commit is contained in:
parent
8dd37e4d91
commit
9c23c28e00
1 changed files with 7 additions and 8 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue