Passivize names remaining events triggered by EditSession

This commit is contained in:
Nathan Sobo
2013-01-03 17:32:15 -07:00
parent fb6fe04023
commit 73b38b6b59
2 changed files with 5 additions and 5 deletions

View File

@@ -51,7 +51,7 @@ class EditSession
@buffer.retain()
@buffer.on "path-changed.edit-session-#{@id}", =>
@trigger "buffer-path-change"
@trigger "path-changed"
@buffer.on "contents-conflicted.edit-session-#{@id}", =>
@trigger "contents-conflicted"
@@ -371,7 +371,7 @@ class EditSession
addCursor: (cursor=new Cursor(editSession: this, screenPosition: [0,0])) ->
@cursors.push(cursor)
@trigger 'add-cursor', cursor
@trigger 'cursor-added', cursor
@addSelectionForCursor(cursor)
cursor
@@ -381,7 +381,7 @@ class EditSession
addSelectionForCursor: (cursor) ->
selection = new Selection(editSession: this, cursor: cursor)
@selections.push(selection)
@trigger 'add-selection', selection
@trigger 'selection-added', selection
selection
addSelectionForBufferRange: (bufferRange, options={}) ->

View File

@@ -476,7 +476,7 @@ class Editor extends View
@activeEditSession.on "contents-conflicted.editor", =>
@showBufferConflictAlert(@activeEditSession)
@activeEditSession.on "buffer-path-change.editor", =>
@activeEditSession.on "path-changed.editor", =>
@trigger 'editor-path-change'
@trigger 'editor-path-change'
@@ -779,7 +779,7 @@ class Editor extends View
@updateLayerDimensions()
@setScrollPositionFromActiveEditSession()
@activeEditSession.on 'add-selection.editor', (selection) =>
@activeEditSession.on 'selection-added.editor', (selection) =>
@newCursors.push(selection.cursor)
@newSelections.push(selection)
@requestDisplayUpdate()