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) {
5757}
5858
5959onceDocumentLoaded ( ( ) => {
60- const scrollTo = ! isNaN ( state . line ) ? state . line : state . scrollProgress ;
60+ const scrollProgress = state . scrollProgress ;
6161
62- if ( typeof scrollTo === 'number' && ! settings . settings . fragment ) {
62+ if ( typeof scrollProgress === 'number' && ! settings . settings . fragment ) {
6363 doAfterImagesLoaded ( ( ) => {
6464 scrollDisabledCount += 1 ;
65- window . scrollTo ( 0 , scrollTo * document . body . clientHeight ) ;
65+ window . scrollTo ( 0 , scrollProgress * document . body . clientHeight ) ;
6666 } ) ;
6767 return ;
6868 }
Original file line number Diff line number Diff line change @@ -755,8 +755,6 @@ export class DynamicMarkdownPreview extends Disposable implements IManagedMarkdo
755755 default :
756756 return ;
757757 }
758- } else if ( ! scrollLocation ) {
759- scrollLocation = new StartingScrollLine ( 0 ) ;
760758 }
761759
762760 this . _preview . dispose ( ) ;
You can’t perform that action at this time.
0 commit comments