提交 c97ccef9 编写于 作者: B Benjamin Pasero

fix #51679

上级 8b453ea8
......@@ -748,17 +748,20 @@ export class EditorGroupView extends Themable implements IEditorGroupView {
openEditorOptions.active = true;
}
// Set group active unless we open inactive or preserve focus
// Do this before we open the editor in the group to prevent a false
// active editor change event before the editor is loaded
// (see https://github.com/Microsoft/vscode/issues/51679)
if (openEditorOptions.active && (!options || !options.preserveFocus)) {
this.accessor.activateGroup(this);
}
// Update model
this._group.openEditor(editor, openEditorOptions);
// Show editor
const showEditorResult = this.doShowEditor(editor, openEditorOptions.active, options);
// Set group active unless we open inactive or preserve focus
if (openEditorOptions.active && (!options || !options.preserveFocus)) {
this.accessor.activateGroup(this);
}
return showEditorResult;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册