@@ -432,7 +432,7 @@ async function init(): Promise<boolean> {
432432 Replay . stopReplayRecording ( ) ;
433433 TestWords . words . reset ( ) ;
434434 TestState . setActiveWordIndex ( 0 ) ;
435- TestInput . input . resetHistory ( ) ;
435+ // TestInput.input.resetHistory();
436436 TestInput . input . current = "" ;
437437
438438 showLoaderBar ( ) ;
@@ -654,7 +654,7 @@ export function areAllTestWordsGenerated(): boolean {
654654//add word during the test
655655export async function addWord ( ) : Promise < void > {
656656 if ( Config . mode === "zen" ) {
657- TestUI . appendEmptyWordElement ( ) ;
657+ TestUI . appendEmptyWordElement ( TestState . activeWordIndex + 1 ) ;
658658 return ;
659659 }
660660
@@ -668,7 +668,7 @@ export async function addWord(): Promise<void> {
668668 const toPushCount = funboxToPush ?. split ( ":" ) [ 1 ] ;
669669 if ( toPushCount !== undefined ) bound = + toPushCount - 1 ;
670670
671- if ( TestWords . words . length - TestInput . input . getHistory ( ) . length > bound ) {
671+ if ( TestWords . words . length - TestState . activeWordIndex > bound ) {
672672 console . debug ( "Not adding word, enough words already" ) ;
673673 return ;
674674 }
@@ -903,14 +903,14 @@ export async function finish(difficultyFailed = false): Promise<void> {
903903 // in case the tests ends with a keypress (not a word submission)
904904 // we need to push the current input to history
905905 if ( TestInput . input . current . length !== 0 ) {
906- TestInput . input . pushHistory ( ) ;
907- Replay . replayGetWordsList ( TestInput . input . getHistory ( ) ) ;
906+ // TestInput.input.pushHistory();
907+ Replay . replayGetWordsList ( getInputHistory ( ) ) ;
908908 }
909909
910910 // in zen mode, ensure the replay words list reflects the typed input history
911911 // even if the current input was empty at finish (e.g., after submitting a word).
912912 if ( Config . mode === "zen" ) {
913- Replay . replayGetWordsList ( TestInput . input . getHistory ( ) ) ;
913+ Replay . replayGetWordsList ( getInputHistory ( ) ) ;
914914 }
915915
916916 forceReleaseAllKeys ( ) ;
@@ -1071,11 +1071,11 @@ export async function finish(difficultyFailed = false): Promise<void> {
10711071 // Let's update the custom text progress
10721072 if (
10731073 TestState . bailedOut ||
1074- TestInput . input . getHistory ( ) . length < TestWords . words . length
1074+ getInputHistory ( ) . length < TestWords . words . length
10751075 ) {
10761076 // They bailed out
10771077
1078- const history = TestInput . input . getHistory ( ) ;
1078+ const history = getInputHistory ( ) ;
10791079 let historyLength = history ?. length ;
10801080 const wordIndex = historyLength - 1 ;
10811081
0 commit comments