提交 c0de5759 编写于 作者: I isidor

proper fix for #68597

上级 172a2df3
...@@ -64,6 +64,7 @@ export class ExplorerView extends ViewletPanel { ...@@ -64,6 +64,7 @@ export class ExplorerView extends ViewletPanel {
private dragHandler: DelayedDragHandler; private dragHandler: DelayedDragHandler;
private decorationProvider: ExplorerDecorationsProvider; private decorationProvider: ExplorerDecorationsProvider;
private autoReveal = false; private autoReveal = false;
private ignoreActiveEditorChange = false;
constructor( constructor(
options: IViewletPanelOptions, options: IViewletPanelOptions,
...@@ -194,7 +195,10 @@ export class ExplorerView extends ViewletPanel { ...@@ -194,7 +195,10 @@ export class ExplorerView extends ViewletPanel {
// When the explorer viewer is loaded, listen to changes to the editor input // When the explorer viewer is loaded, listen to changes to the editor input
this.disposables.push(this.editorService.onDidActiveEditorChange(() => { this.disposables.push(this.editorService.onDidActiveEditorChange(() => {
this.selectActiveFile(); if (!this.ignoreActiveEditorChange) {
this.selectActiveFile();
}
this.ignoreActiveEditorChange = false;
})); }));
// Also handle configuration updates // Also handle configuration updates
...@@ -336,6 +340,7 @@ export class ExplorerView extends ViewletPanel { ...@@ -336,6 +340,7 @@ export class ExplorerView extends ViewletPanel {
"from": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } "from": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
}*/ }*/
this.telemetryService.publicLog('workbenchActionExecuted', { id: 'workbench.files.openFile', from: 'explorer' }); this.telemetryService.publicLog('workbenchActionExecuted', { id: 'workbench.files.openFile', from: 'explorer' });
this.ignoreActiveEditorChange = true;
this.editorService.openEditor({ resource: selection[0].resource, options: { preserveFocus: e.editorOptions.preserveFocus, pinned: e.editorOptions.pinned } }, e.sideBySide ? SIDE_GROUP : ACTIVE_GROUP) this.editorService.openEditor({ resource: selection[0].resource, options: { preserveFocus: e.editorOptions.preserveFocus, pinned: e.editorOptions.pinned } }, e.sideBySide ? SIDE_GROUP : ACTIVE_GROUP)
.then(undefined, onUnexpectedError); .then(undefined, onUnexpectedError);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册