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 @@ -584,7 +584,7 @@ export function updateWordsWrapperHeight(force = false): void {
584
584
585
585
function updateWordsMargin ( ) : void {
586
586
if ( Config . tapeMode !== "off" ) {
587
- void scrollTape ( ) ;
587
+ void scrollTape ( true ) ;
588
588
} else {
589
589
const wordsEl = document . getElementById ( "words" ) as HTMLElement ;
590
590
const afterNewlineEls =
@@ -822,7 +822,7 @@ function getNlCharWidth(
822
822
return nlChar . offsetWidth + letterMargin ;
823
823
}
824
824
825
- export async function scrollTape ( ) : Promise < void > {
825
+ export async function scrollTape ( noRemove = false ) : Promise < void > {
826
826
if ( ActivePage . get ( ) !== "test" || resultVisible ) return ;
827
827
828
828
await centeringActiveLine ;
@@ -946,7 +946,7 @@ export async function scrollTape(): Promise<void> {
946
946
}
947
947
948
948
/* remove overflown elements */
949
- if ( toRemove . length > 0 ) {
949
+ if ( toRemove . length > 0 && ! noRemove ) {
950
950
activeWordElementOffset += wordsToRemoveCount ;
951
951
for ( const el of toRemove ) el . remove ( ) ;
952
952
for ( let i = 0 ; i < widthRemovedFromLine . length ; i ++ ) {
You can’t perform that action at this time.
0 commit comments