Respect preserveFolds attribute when creating selections from markers

This commit is contained in:
Ivan Zuzak
2014-09-04 13:57:41 +02:00
parent ebbfaa23ce
commit 8a6e72f21f

View File

@@ -1722,7 +1722,7 @@ class Editor extends Model
selection = new Selection(_.extend({editor: this, marker, cursor}, options))
@selections.push(selection)
selectionBufferRange = selection.getBufferRange()
@mergeIntersectingSelections()
@mergeIntersectingSelections(preserveFolds: marker.getAttributes().preserveFolds)
if selection.destroyed
for selection in @getSelections()
if selection.intersectsBufferRange(selectionBufferRange)