mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-20 15:37:46 +03:00
Merge branch 'cj-remove-openSingletonSync'
This commit is contained in:
commit
a99c404a78
@ -76,7 +76,7 @@
|
||||
"editor-stats": "0.13.0",
|
||||
"exception-reporting": "0.13.0",
|
||||
"feedback": "0.23.0",
|
||||
"find-and-replace": "0.82.0",
|
||||
"find-and-replace": "0.83.0",
|
||||
"fuzzy-finder": "0.34.0",
|
||||
"gists": "0.17.0",
|
||||
"git-diff": "0.24.0",
|
||||
|
@ -51,7 +51,7 @@ class WorkspaceView extends View
|
||||
Delegator.includeInto(this)
|
||||
|
||||
@delegatesProperty 'fullScreen', 'destroyedItemUris', toProperty: 'model'
|
||||
@delegatesMethods 'open', 'openSync', 'openSingletonSync', 'reopenItemSync',
|
||||
@delegatesMethods 'open', 'openSync', 'reopenItemSync',
|
||||
'saveActivePaneItem', 'saveActivePaneItemAs', 'saveAll', 'destroyActivePaneItem',
|
||||
'destroyActivePane', 'increaseFontSize', 'decreaseFontSize', toProperty: 'model'
|
||||
|
||||
|
@ -111,29 +111,6 @@ class Workspace extends Model
|
||||
@activePane.activate() if activatePane
|
||||
editor
|
||||
|
||||
# Deprecated
|
||||
openSingletonSync: (uri, options={}) ->
|
||||
{initialLine, split} = options
|
||||
# TODO: Remove deprecated changeFocus option
|
||||
activatePane = options.activatePane ? options.changeFocus ? true
|
||||
uri = atom.project.relativize(uri)
|
||||
|
||||
if pane = @paneContainer.paneForUri(uri)
|
||||
editor = pane.itemForUri(uri)
|
||||
else
|
||||
pane = switch split
|
||||
when 'left'
|
||||
@activePane.findLeftmostSibling()
|
||||
when 'right'
|
||||
@activePane.findOrCreateRightmostSibling()
|
||||
else
|
||||
@activePane
|
||||
editor = atom.project.openSync(uri, {initialLine})
|
||||
|
||||
pane.activateItem(editor)
|
||||
pane.activate() if activatePane
|
||||
editor
|
||||
|
||||
# Public: Reopens the last-closed item uri if it hasn't already been reopened.
|
||||
reopenItemSync: ->
|
||||
if uri = @destroyedItemUris.pop()
|
||||
|
Loading…
Reference in New Issue
Block a user