Defer selection merge until dragging completes

This commit is contained in:
Nathan Sobo
2015-08-03 21:43:43 -06:00
parent 7e0dc570f3
commit 52e640156c
3 changed files with 21 additions and 3 deletions

View File

@@ -1948,10 +1948,11 @@ class TextEditor extends Model
# This method may merge selections that end up intesecting.
#
# * `position` An instance of {Point}, with a given `row` and `column`.
selectToScreenPosition: (position) ->
selectToScreenPosition: (position, suppressMerge) ->
lastSelection = @getLastSelection()
lastSelection.selectToScreenPosition(position)
@mergeIntersectingSelections(reversed: lastSelection.isReversed())
unless suppressMerge
@mergeIntersectingSelections(reversed: lastSelection.isReversed())
# Essential: Move the cursor of each selection one character upward while
# preserving the selection's tail position.