Autoscroll the editor as a quadratic function of mouse cursor overshoot

This was a spike and still needs tests, but it’s going to be way better.
This commit is contained in:
Nathan Sobo
2015-08-27 18:57:06 -06:00
parent b2e8b05cbe
commit 567199a3d2
3 changed files with 62 additions and 32 deletions

View File

@@ -1943,10 +1943,10 @@ 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, suppressMerge) ->
selectToScreenPosition: (position, options) ->
lastSelection = @getLastSelection()
lastSelection.selectToScreenPosition(position)
unless suppressMerge
lastSelection.selectToScreenPosition(position, options)
unless options?.suppressSelectionMerge
@mergeIntersectingSelections(reversed: lastSelection.isReversed())
# Essential: Move the cursor of each selection one character upward while