Revert "explorer: keep focused item even when editors close"

This reverts commit 6c6f520eb1.
This commit is contained in:
Benjamin Pasero 2016-10-27 08:25:00 +02:00
parent 2d3b665468
commit 7daa2494d0

View file

@ -160,6 +160,7 @@ export class ExplorerView extends CollapsibleViewletView {
private onEditorsChanged(): void {
const activeInput = this.editorService.getActiveEditorInput();
let clearSelection = true;
let clearFocus = false;
// Handle File Input
if (activeInput instanceof FileEditorInput) {
@ -182,12 +183,17 @@ export class ExplorerView extends CollapsibleViewletView {
// Handle closed or untitled file (convince explorer to not reopen any file when getting visible)
if (activeInput instanceof UntitledEditorInput || !activeInput) {
this.settings[ExplorerView.MEMENTO_LAST_ACTIVE_FILE_RESOURCE] = void 0;
clearFocus = true;
}
// Otherwise clear
if (clearSelection) {
this.explorerViewer.clearSelection();
}
if (clearFocus) {
this.explorerViewer.clearFocus();
}
}
private onConfigurationUpdated(configuration: IFilesConfiguration, refresh?: boolean): void {