Support :tabonly. Code shamelessly copied from the close-other-tabs extension.
This commit is contained in:
parent
d3c3603eb4
commit
cd80a163cb
1 changed files with 10 additions and 0 deletions
|
|
@ -163,6 +163,16 @@ class Ex
|
|||
|
||||
tabp: => @tabprevious()
|
||||
|
||||
tabonly: ->
|
||||
tabBar = atom.workspace.getPanes()[0]
|
||||
tabBarElement = atom.views.getView(tabBar).querySelector(".tab-bar")
|
||||
tabBarElement.querySelector(".right-clicked") && tabBarElement.querySelector(".right-clicked").classList.remove("right-clicked")
|
||||
tabBarElement.querySelector(".active").classList.add("right-clicked")
|
||||
atom.commands.dispatch(tabBarElement, 'tabs:close-other-tabs')
|
||||
tabBarElement.querySelector(".active").classList.remove("right-clicked")
|
||||
|
||||
tabo: => @tabonly()
|
||||
|
||||
edit: ({ range, args, editor }) ->
|
||||
filePath = args.trim()
|
||||
if filePath[0] is '!'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue