mirror of
https://github.com/atom/atom.git
synced 2026-02-14 08:35:11 -05:00
Rename to DisplayBuffer.observeMarkerHeadPosition
When you observe, you get callbacks whenever the screen or buffer position changes, and you get the new and old position in both coordinate types.
This commit is contained in:
@@ -12,7 +12,7 @@ class Cursor
|
||||
needsAutoscroll: null
|
||||
|
||||
constructor: ({@editSession, @marker}) ->
|
||||
@editSession.observeMarkerHeadScreenPosition @marker, (e) =>
|
||||
@editSession.observeMarkerHeadPosition @marker, (e) =>
|
||||
@needsAutoscroll ?= @isLastCursor() and !e.bufferChanged
|
||||
@trigger 'moved', e
|
||||
@editSession.trigger 'cursor-moved', e
|
||||
|
||||
@@ -369,7 +369,7 @@ class DisplayBuffer
|
||||
isMarkerReversed: (id) ->
|
||||
@buffer.isMarkerReversed(id)
|
||||
|
||||
observeMarkerHeadScreenPosition: (id, callback) ->
|
||||
observeMarkerHeadPosition: (id, callback) ->
|
||||
@getMarker(id).observeHeadPosition(callback)
|
||||
|
||||
refreshMarkerScreenPositions: ->
|
||||
|
||||
@@ -489,8 +489,8 @@ class EditSession
|
||||
setMarkerTailBufferPosition: (args...) ->
|
||||
@displayBuffer.setMarkerTailBufferPosition(args...)
|
||||
|
||||
observeMarkerHeadScreenPosition: (args...) ->
|
||||
@displayBuffer.observeMarkerHeadScreenPosition(args...)
|
||||
observeMarkerHeadPosition: (args...) ->
|
||||
@displayBuffer.observeMarkerHeadPosition(args...)
|
||||
|
||||
placeMarkerTail: (args...) ->
|
||||
@displayBuffer.placeMarkerTail(args...)
|
||||
|
||||
Reference in New Issue
Block a user