提交 6a21b7c2 编写于 作者: B Benjamin Pasero

Dragging a folder onto the empty spaces opens the currently selected file (fixes #8364)

上级 13aed203
...@@ -230,13 +230,7 @@ export class TextFileEditor extends BaseTextEditor { ...@@ -230,13 +230,7 @@ export class TextFileEditor extends BaseTextEditor {
private openAsFolder(input: EditorInput): boolean { private openAsFolder(input: EditorInput): boolean {
// Since we cannot open a folder, we have to restore the previous input if any and close the editor // Since we cannot open a folder, we have to restore the previous input if any and close the editor
let handleEditorPromise: TPromise<any> = this.editorService.closeEditor(this.position, this.input); this.editorService.closeEditor(this.position, this.input).done(() => {
let previousInput = this.historyService.getHistory()[1];
if (previousInput) {
handleEditorPromise = handleEditorPromise.then(() => this.editorService.openEditor(previousInput, null, this.position));
}
handleEditorPromise.done(() => {
// Best we can do is to reveal the folder in the explorer // Best we can do is to reveal the folder in the explorer
if (input instanceof FileEditorInput) { if (input instanceof FileEditorInput) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册