Commit f9894111 authored by yann300's avatar yann300

add remove tabs of provider

parent 570c2d06
...@@ -95,12 +95,21 @@ class FileManager { ...@@ -95,12 +95,21 @@ class FileManager {
return path ? path[1] : null return path ? path[1] : null
} }
removeTabsOf (provider) {
for (var tab in this.tabbedFiles) {
if (this.fileProviderOf(tab).type === provider.type) {
this.fileRemovedEvent(tab)
}
}
}
fileRemovedEvent (path) { fileRemovedEvent (path) {
var self = this var self = this
if (!this.tabbedFiles[path]) return
if (path === self._deps.config.get('currentFile')) { if (path === self._deps.config.get('currentFile')) {
self._deps.config.set('currentFile', '') self._deps.config.set('currentFile', '')
} }
self._deps.editor.discardCurrentSession() self._deps.editor.discard(path)
delete this.tabbedFiles[path] delete this.tabbedFiles[path]
this.refreshTabs() this.refreshTabs()
this.switchFile() this.switchFile()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment