Move WorkspaceView::reopenItemSync to the Workspace model

This commit is contained in:
Nathan Sobo
2014-01-13 21:35:59 -07:00
parent 66bb9dab93
commit adf5cfc78c
2 changed files with 7 additions and 6 deletions

View File

@@ -106,6 +106,11 @@ class Workspace extends Model
else
@openSync(uri, {changeFocus, initialLine, split})
# Public: Reopens the last-closed item uri if it hasn't already been reopened.
reopenItemSync: ->
if uri = @destroyedItemUris.pop()
@openSync(uri)
# Private: Removes the item's uri from the list of potential items to reopen.
itemOpened: (item) ->
if uri = item.getUri?()