mirror of
https://github.com/Microsoft/vscode
synced 2024-09-13 21:55:38 +00:00
Default to not updating scroll position if no valid editor is found. Part of #25910
This commit is contained in:
parent
604248eebd
commit
087a2d2f24
|
@ -206,7 +206,7 @@ export class MDDocumentContentProvider implements vscode.TextDocumentContentProv
|
|||
return vscode.workspace.openTextDocument(sourceUri).then(document => {
|
||||
this.config = MarkdownPreviewConfig.getCurrentConfig();
|
||||
|
||||
let initialLine = 0;
|
||||
let initialLine: number | undefined = undefined;
|
||||
const editor = vscode.window.activeTextEditor;
|
||||
if (editor && editor.document.uri.fsPath === sourceUri.fsPath) {
|
||||
initialLine = editor.selection.active.line;
|
||||
|
|
Loading…
Reference in a new issue