⬆️ text-buffer for marker layer destruction fixes

This commit is contained in:
Max Brunsfeld
2016-08-04 12:37:51 -07:00
parent a589543277
commit 74f8890592
2 changed files with 8 additions and 1 deletions

View File

@@ -58,7 +58,7 @@
"sinon": "1.17.4",
"source-map-support": "^0.3.2",
"temp": "0.8.1",
"text-buffer": "9.2.3",
"text-buffer": "9.2.5",
"typescript-simple": "1.0.0",
"underscore-plus": "^1.6.6",
"winreg": "^1.2.1",

View File

@@ -5901,6 +5901,13 @@ describe "TextEditor", ->
rangeIsReversed: false
}
it "does not throw errors after the marker's containing layer is destroyed", ->
layer = editor.addMarkerLayer()
marker = layer.markBufferRange([[2, 4], [6, 8]])
decoration = editor.decorateMarker(marker, type: 'highlight', class: 'foo')
layer.destroy()
editor.decorationsStateForScreenRowRange(0, 5)
describe "::decorateMarkerLayer", ->
it "based on the markers in the layer, includes multiple decoration objects with the same properties and different ranges in the object returned from ::decorationsStateForScreenRowRange", ->
layer1 = editor.getBuffer().addMarkerLayer()