mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
EditSession specs passing after converting Selection to use markers
Still a bit of a mess though...
This commit is contained in:
@@ -691,7 +691,7 @@ describe 'Buffer', ->
|
||||
beforeEach ->
|
||||
marker = buffer.markRange([[4, 20], [4, 23]])
|
||||
|
||||
it "allows a markers head and tail positions to be changed", ->
|
||||
it "allows a marker's head and tail positions to be changed", ->
|
||||
buffer.setMarkerHeadPosition(marker, [5, 3])
|
||||
expect(buffer.getMarkerRange(marker)).toEqual [[4, 20], [5, 3]]
|
||||
|
||||
@@ -705,6 +705,14 @@ describe 'Buffer', ->
|
||||
buffer.setMarkerTailPosition(marker, [Infinity, Infinity])
|
||||
expect(buffer.getMarkerRange(marker)).toEqual([[0, 0], [12, 2]])
|
||||
|
||||
it "allows a marker's tail to be placed and cleared", ->
|
||||
buffer.clearMarkerTail(marker)
|
||||
expect(buffer.getMarkerRange(marker)).toEqual [[4, 23], [4, 23]]
|
||||
buffer.placeMarkerTail(marker)
|
||||
buffer.setMarkerHeadPosition(marker, [2, 0])
|
||||
expect(buffer.getMarkerRange(marker)).toEqual [[2, 0], [4, 23]]
|
||||
expect(buffer.isMarkerReversed(marker)).toBeTruthy()
|
||||
|
||||
describe "marker observation", ->
|
||||
describe ".observeMarkerHeadPosition(marker, callback)", ->
|
||||
observeHandler = null
|
||||
|
||||
Reference in New Issue
Block a user