Merge branch 'master' of github.com:github/atom

This commit is contained in:
Nathan Sobo
2012-04-04 18:27:40 -06:00
5 changed files with 37 additions and 15 deletions

View File

@@ -186,6 +186,7 @@ class Editor extends View
@off 'mousemove', moveHandler
reverse = @compositeSelection.getLastSelection().isReversed()
@compositeSelection.mergeIntersectingSelections({reverse})
@syncCursorAnimations()
renderLines: ->
@lineCache = []
@@ -484,9 +485,9 @@ class Editor extends View
@buffer.getMode()
scrollTo: (pixelPosition) ->
_.defer =>
@scrollVertically(pixelPosition)
@scrollHorizontally(pixelPosition)
_.defer => # Optimization
@scrollVertically(pixelPosition)
@scrollHorizontally(pixelPosition)
scrollVertically: (pixelPosition) ->
linesInView = @scroller.height() / @lineHeight
@@ -516,5 +517,9 @@ class Editor extends View
else if desiredLeft < @scroller.scrollLeft()
@scroller.scrollLeft(desiredLeft)
syncCursorAnimations: ->
for cursor in @getCursors()
do (cursor) -> cursor.resetCursorAnimation()
logLines: ->
@renderer.logLines()