|
|
@ -54,7 +54,7 @@ export class TabProxy extends Plugin { |
|
|
|
workspace ? this.removeTab(workspace + '/' + name) : this.removeTab(this.fileManager.mode + '/' + name) |
|
|
|
workspace ? this.removeTab(workspace + '/' + name) : this.removeTab(this.fileManager.mode + '/' + name) |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
fileManager.events.on('currentFileChanged', (file) => { |
|
|
|
fileManager.events.on('currentFileChanged', async (file) => { |
|
|
|
const workspace = this.fileManager.currentWorkspace() |
|
|
|
const workspace = this.fileManager.currentWorkspace() |
|
|
|
|
|
|
|
|
|
|
|
if (workspace) { |
|
|
|
if (workspace) { |
|
|
@ -64,9 +64,12 @@ export class TabProxy extends Plugin { |
|
|
|
this._view.filetabs.activateTab(workspacePath) |
|
|
|
this._view.filetabs.activateTab(workspacePath) |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
this.addTab(workspacePath, '', () => { |
|
|
|
this.addTab(workspacePath, '', async () => { |
|
|
|
this.fileManager.open(file) |
|
|
|
try { |
|
|
|
this.event.emit('openFile', file) |
|
|
|
await this.fileManager.open(file) |
|
|
|
|
|
|
|
this.event.emit('openFile', file) |
|
|
|
|
|
|
|
} catch (e) { |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
() => { |
|
|
|
() => { |
|
|
|
this.fileManager.closeFile(file) |
|
|
|
this.fileManager.closeFile(file) |
|
|
@ -79,9 +82,12 @@ export class TabProxy extends Plugin { |
|
|
|
this._view.filetabs.activateTab(path) |
|
|
|
this._view.filetabs.activateTab(path) |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
this.addTab(path, '', () => { |
|
|
|
this.addTab(path, '', async () => { |
|
|
|
this.fileManager.open(file) |
|
|
|
try { |
|
|
|
this.event.emit('openFile', file) |
|
|
|
await this.fileManager.open(file) |
|
|
|
|
|
|
|
this.event.emit('openFile', file) |
|
|
|
|
|
|
|
} catch (e) { |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
() => { |
|
|
|
() => { |
|
|
|
this.fileManager.closeFile(file) |
|
|
|
this.fileManager.closeFile(file) |
|
|
|