mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-03 23:06:49 +01:00
Default to not updating scroll position if no valid editor is found. Part of #25910
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user