From 6a21b7c22eee6b2e7e4a6f57703861f0ee0cca47 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Tue, 28 Jun 2016 19:01:25 +0200 Subject: [PATCH] Dragging a folder onto the empty spaces opens the currently selected file (fixes #8364) --- .../parts/files/browser/editors/textFileEditor.ts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/vs/workbench/parts/files/browser/editors/textFileEditor.ts b/src/vs/workbench/parts/files/browser/editors/textFileEditor.ts index 549a0a40138..c46a0eeddc2 100644 --- a/src/vs/workbench/parts/files/browser/editors/textFileEditor.ts +++ b/src/vs/workbench/parts/files/browser/editors/textFileEditor.ts @@ -230,13 +230,7 @@ export class TextFileEditor extends BaseTextEditor { private openAsFolder(input: EditorInput): boolean { // Since we cannot open a folder, we have to restore the previous input if any and close the editor - let handleEditorPromise: TPromise = this.editorService.closeEditor(this.position, this.input); - let previousInput = this.historyService.getHistory()[1]; - if (previousInput) { - handleEditorPromise = handleEditorPromise.then(() => this.editorService.openEditor(previousInput, null, this.position)); - } - - handleEditorPromise.done(() => { + this.editorService.closeEditor(this.position, this.input).done(() => { // Best we can do is to reveal the folder in the explorer if (input instanceof FileEditorInput) { -- GitLab