File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed
extensions/markdown-language-features Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -57,12 +57,12 @@ function doAfterImagesLoaded(cb: () => void) {
57
57
}
58
58
59
59
onceDocumentLoaded ( ( ) => {
60
- const scrollTo = ! isNaN ( state . line ) ? state . line : state . scrollProgress ;
60
+ const scrollProgress = state . scrollProgress ;
61
61
62
- if ( typeof scrollTo === 'number' && ! settings . settings . fragment ) {
62
+ if ( typeof scrollProgress === 'number' && ! settings . settings . fragment ) {
63
63
doAfterImagesLoaded ( ( ) => {
64
64
scrollDisabledCount += 1 ;
65
- window . scrollTo ( 0 , scrollTo * document . body . clientHeight ) ;
65
+ window . scrollTo ( 0 , scrollProgress * document . body . clientHeight ) ;
66
66
} ) ;
67
67
return ;
68
68
}
Original file line number Diff line number Diff line change @@ -755,8 +755,6 @@ export class DynamicMarkdownPreview extends Disposable implements IManagedMarkdo
755
755
default :
756
756
return ;
757
757
}
758
- } else if ( ! scrollLocation ) {
759
- scrollLocation = new StartingScrollLine ( 0 ) ;
760
758
}
761
759
762
760
this . _preview . dispose ( ) ;
You can’t perform that action at this time.
0 commit comments