File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -588,7 +588,7 @@ export function updateWordsWrapperHeight(force = false): void {
588
588
589
589
function updateWordsMargin ( ) : void {
590
590
if ( Config . tapeMode !== "off" ) {
591
- void scrollTape ( ) ;
591
+ void scrollTape ( true ) ;
592
592
} else {
593
593
const wordsEl = document . getElementById ( "words" ) as HTMLElement ;
594
594
const afterNewlineEls =
@@ -826,7 +826,7 @@ function getNlCharWidth(
826
826
return nlChar . offsetWidth + letterMargin ;
827
827
}
828
828
829
- export async function scrollTape ( ) : Promise < void > {
829
+ export async function scrollTape ( noRemove = false ) : Promise < void > {
830
830
if ( ActivePage . get ( ) !== "test" || resultVisible ) return ;
831
831
832
832
await centeringActiveLine ;
@@ -950,7 +950,7 @@ export async function scrollTape(): Promise<void> {
950
950
}
951
951
952
952
/* remove overflown elements */
953
- if ( toRemove . length > 0 ) {
953
+ if ( toRemove . length > 0 && ! noRemove ) {
954
954
activeWordElementOffset += wordsToRemoveCount ;
955
955
for ( const el of toRemove ) el . remove ( ) ;
956
956
for ( let i = 0 ; i < widthRemovedFromLine . length ; i ++ ) {
You can’t perform that action at this time.
0 commit comments