mirror of
https://github.com/atom/atom.git
synced 2026-02-15 00:55:14 -05:00
Get more specs passing. Failing specs due to missing features.
This commit is contained in:
committed by
probablycorey
parent
281a28bb0e
commit
45eec6a8ff
@@ -14,7 +14,7 @@ module.exports =
|
||||
class EditSession
|
||||
registerDeserializer(this)
|
||||
|
||||
@deserialize: (state, project) ->
|
||||
@deserialize: (state) ->
|
||||
if fs.exists(state.buffer)
|
||||
session = project.buildEditSession(state.buffer)
|
||||
else
|
||||
|
||||
@@ -70,7 +70,7 @@ class Editor extends View
|
||||
if editSessionOrOptions instanceof EditSession
|
||||
editSession = editSessionOrOptions
|
||||
else
|
||||
{editSession, @mini, deserializing} = (options ? {})
|
||||
{editSession, @mini, deserializing} = (editSessionOrOptions ? {})
|
||||
|
||||
requireStylesheet 'editor.css'
|
||||
|
||||
@@ -793,19 +793,19 @@ class Editor extends View
|
||||
new Editor { editSession: editSession ? @activeEditSession.copy() }
|
||||
|
||||
splitLeft: (editSession) ->
|
||||
@pane()?.splitLeft(@newSplitEditor(editSession)).wrappedView
|
||||
@pane()?.splitLeft(@newSplitEditor(editSession)).currentItem
|
||||
|
||||
splitRight: (editSession) ->
|
||||
@pane()?.splitRight(@newSplitEditor(editSession)).wrappedView
|
||||
@pane()?.splitRight(@newSplitEditor(editSession)).currentItem
|
||||
|
||||
splitUp: (editSession) ->
|
||||
@pane()?.splitUp(@newSplitEditor(editSession)).wrappedView
|
||||
@pane()?.splitUp(@newSplitEditor(editSession)).currentItem
|
||||
|
||||
splitDown: (editSession) ->
|
||||
@pane()?.splitDown(@newSplitEditor(editSession)).wrappedView
|
||||
@pane()?.splitDown(@newSplitEditor(editSession)).currentItem
|
||||
|
||||
pane: ->
|
||||
@parent('.pane').view()
|
||||
@closest('.pane').view()
|
||||
|
||||
promptToSaveDirtySession: (session, callback) ->
|
||||
path = session.getPath()
|
||||
@@ -821,7 +821,7 @@ class Editor extends View
|
||||
remove: (selector, keepData) ->
|
||||
return super if keepData or @removed
|
||||
@trigger 'editor:will-be-removed'
|
||||
if @pane() then @pane().remove() else super
|
||||
super
|
||||
rootView?.focus()
|
||||
|
||||
afterRemove: ->
|
||||
|
||||
@@ -120,6 +120,7 @@ class RootView extends View
|
||||
if not editor.mini
|
||||
editor.on 'editor:path-changed.root-view', =>
|
||||
@trigger 'root-view:active-path-changed', editor.getPath()
|
||||
|
||||
if not previousActiveEditor or editor.getPath() != previousActiveEditor.getPath()
|
||||
@trigger 'root-view:active-path-changed', editor.getPath()
|
||||
|
||||
@@ -144,7 +145,7 @@ class RootView extends View
|
||||
document.title = @title
|
||||
|
||||
getEditors: ->
|
||||
@panes.find('.pane > .editor').map(-> $(this).view()).toArray()
|
||||
@panes.find('.pane > .item-views > .editor').map(-> $(this).view()).toArray()
|
||||
|
||||
getModifiedBuffers: ->
|
||||
modifiedBuffers = []
|
||||
|
||||
Reference in New Issue
Block a user