mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
🐧 Add keymap implementation to reorder tabs in linux
This commit is contained in:
committed by
Ben Ogle
parent
3462d99675
commit
ff80545285
@@ -119,6 +119,8 @@ atom.commands.add 'atom-pane',
|
||||
'pane:show-item-7': -> @getModel().activateItemAtIndex(6)
|
||||
'pane:show-item-8': -> @getModel().activateItemAtIndex(7)
|
||||
'pane:show-item-9': -> @getModel().activateItemAtIndex(8)
|
||||
'pane:move-item-to-right': -> @getModel().moveItemToRight()
|
||||
'pane:move-item-to-left': -> @getModel().moveItemToLeft()
|
||||
'pane:split-left': -> @getModel().splitLeft(copyActiveItem: true)
|
||||
'pane:split-right': -> @getModel().splitRight(copyActiveItem: true)
|
||||
'pane:split-up': -> @getModel().splitUp(copyActiveItem: true)
|
||||
|
||||
@@ -289,6 +289,18 @@ class Pane extends Model
|
||||
else
|
||||
@activateItemAtIndex(@items.length - 1)
|
||||
|
||||
# Public: Move the active tab to the right.
|
||||
moveItemToRight: ->
|
||||
index = @getActiveItemIndex()
|
||||
rightItemIndex = index + 1
|
||||
@moveItem(@getActiveItem(), rightItemIndex) unless rightItemIndex > @items.length - 1
|
||||
|
||||
# Public: Move the active tab to the left
|
||||
moveItemToLeft: ->
|
||||
index = @getActiveItemIndex()
|
||||
leftItemIndex = index - 1
|
||||
@moveItem(@getActiveItem(), leftItemIndex) unless leftItemIndex < 0
|
||||
|
||||
# Public: Get the index of the active item.
|
||||
#
|
||||
# Returns a {Number}.
|
||||
|
||||
Reference in New Issue
Block a user