mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 13:00:58 +00:00
Revert "explorer: keep focused item even when editors close"
This reverts commit 6c6f520eb1
.
This commit is contained in:
parent
2d3b665468
commit
7daa2494d0
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue