mirror of
https://github.com/atom/atom.git
synced 2026-01-24 06:18:03 -05:00
more natural cmd-w for the tabs pane again
This commit is contained in:
@@ -50,8 +50,17 @@ class TabsPane extends Pane
|
||||
$("#tabs ul li:last").addClass 'active'
|
||||
|
||||
closeActiveTab: ->
|
||||
@removeTab $('#tabs ul .active').data 'path'
|
||||
@prevTab()
|
||||
tabsLength = $('#tabs ul li').length
|
||||
activePath = $('#tabs ul .active').data 'path'
|
||||
|
||||
if tabsLength is 1
|
||||
@removeTab activePath
|
||||
$('#main-container').children().css 'display', 'none !important'
|
||||
else if tabsLength > 0
|
||||
@removeTab activePath
|
||||
@prevTab()
|
||||
else
|
||||
window.close()
|
||||
|
||||
removeTab: (path) ->
|
||||
tab = $("#tabs li[data-path='#{path}']")
|
||||
|
||||
Reference in New Issue
Block a user