mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Passivize names remaining events triggered by EditSession
This commit is contained in:
@@ -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={}) ->
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user