🐧 Add keymap implementation to reorder tabs in linux

This commit is contained in:
Ardeshir Javaherchi
2014-11-08 15:03:36 -08:00
committed by Ben Ogle
parent 3462d99675
commit ff80545285
3 changed files with 16 additions and 0 deletions

View File

@@ -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}.