提交 087a2d2f 编写于 作者: M Matt Bierner

Default to not updating scroll position if no valid editor is found. Part of #25910

上级 604248ee
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册