Skip to content
This repository was archived by the owner on Apr 6, 2018. It is now read-only.

Commit bb926ff

Browse files
committed
fix: yank should not scroll
1 parent f1cd0ea commit bb926ff

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/operators/general-operators.coffee

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,8 @@ class Yank extends Operator
185185
#
186186
# Returns nothing.
187187
execute: (count) ->
188+
oldManageScrollPosition = @editor.manageScrollPosition
189+
@editor.manageScrollPosition = false
188190
originalPositions = @editor.getCursorBufferPositions()
189191
if _.contains(@motion.select(count), true)
190192
text = @editor.getSelectedText()
@@ -201,6 +203,7 @@ class Yank extends Operator
201203
@setTextRegister(@register, text)
202204

203205
@editor.setSelectedBufferRanges(newPositions.map (p) -> new Range(p, p))
206+
@editor.manageScrollPosition = oldManageScrollPosition
204207
@vimState.activateCommandMode()
205208

206209
#

0 commit comments

Comments
 (0)