Commit 04516fbf authored by LianaHus's avatar LianaHus

fixed tab remove.

Authors: @yann300, @lianahus
parent e8e3e709
...@@ -105,6 +105,8 @@ export class TabProxy { ...@@ -105,6 +105,8 @@ export class TabProxy {
} }
addTab (name, switchTo, close, kind) { addTab (name, switchTo, close, kind) {
if (this._handlers[name]) return
var slash = name.split('/') var slash = name.split('/')
let title = name.indexOf('/') !== -1 ? slash[slash.length - 1] : name let title = name.indexOf('/') !== -1 ? slash[slash.length - 1] : name
this._view.filetabs.addTab({ this._view.filetabs.addTab({
...@@ -117,7 +119,7 @@ export class TabProxy { ...@@ -117,7 +119,7 @@ export class TabProxy {
} }
removeTab (name) { removeTab (name) {
this._view.filetabs.closeTab(name) this._view.filetabs.removeTab(name)
delete this._handlers[name] delete this._handlers[name]
} }
......
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