mirror of
https://github.com/atom/atom.git
synced 2026-02-14 00:25:08 -05:00
Start adding marker methods to DisplayBuffer
Whereas marker methods on buffer take for granted that everything is in buffer coordinates, methods on the DisplayBuffer offer both screen and buffer coordinate versions of the marker API.
This commit is contained in:
@@ -296,12 +296,51 @@ class DisplayBuffer
|
||||
markBufferRange: (bufferRange) ->
|
||||
@buffer.markRange(bufferRange)
|
||||
|
||||
markScreenPosition: (screenPosition) ->
|
||||
@markBufferPosition(@bufferPositionForScreenPosition(screenPosition))
|
||||
|
||||
markBufferPosition: (bufferPosition) ->
|
||||
@buffer.markPosition(bufferPosition)
|
||||
|
||||
getMarkerScreenRange: (id) ->
|
||||
@screenRangeForBufferRange(@getMarkerBufferRange(id))
|
||||
|
||||
getMarkerBufferRange: (id) ->
|
||||
@buffer.getMarkerRange(id)
|
||||
|
||||
getMarkerScreenPosition: (id) ->
|
||||
@getMarkerHeadScreenPosition(id)
|
||||
|
||||
getMarkerBufferPosition: (id) ->
|
||||
@getMarkerHeadBufferPosition(id)
|
||||
|
||||
getMarkerHeadScreenPosition: (id) ->
|
||||
@screenPositionForBufferPosition(@getMarkerHeadBufferPosition(id))
|
||||
|
||||
setMarkerHeadScreenPosition: (id, screenPosition, options) ->
|
||||
@setMarkerHeadBufferPosition(id, @bufferPositionForScreenPosition(screenPosition, options))
|
||||
|
||||
getMarkerHeadBufferPosition: (id) ->
|
||||
@buffer.getMarkerHeadPosition(id)
|
||||
|
||||
setMarkerHeadBufferPosition: (id, bufferPosition) ->
|
||||
@buffer.setMarkerHeadPosition(id, bufferPosition)
|
||||
|
||||
getMarkerTailScreenPosition: (id) ->
|
||||
@screenPositionForBufferPosition(@getMarkerTailBufferPosition(id))
|
||||
|
||||
setMarkerTailScreenPosition: (id, screenPosition, options) ->
|
||||
@setMarkerTailBufferPosition(id, @bufferPositionForScreenPosition(screenPosition, options))
|
||||
|
||||
getMarkerTailBufferPosition: (id) ->
|
||||
@buffer.getMarkerTailPosition(id)
|
||||
|
||||
setMarkerTailBufferPosition: (id, bufferPosition) ->
|
||||
@buffer.setMarkerTailPosition(id, bufferPosition)
|
||||
|
||||
isMarkerReversed: (id) ->
|
||||
@buffer.isMarkerReversed(id)
|
||||
|
||||
destroy: ->
|
||||
@tokenizedBuffer.destroy()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user