Only autoscroll in model when adding selection in React editors

Fixes atom/find-and-replace#245
This commit is contained in:
Nathan Sobo
2014-07-09 07:46:44 -06:00
parent 6a2021ac98
commit 86ea4d94bb

View File

@@ -1264,7 +1264,7 @@ class Editor extends Model
addSelectionForBufferRange: (bufferRange, options={}) ->
@markBufferRange(bufferRange, _.defaults(@getSelectionMarkerAttributes(), options))
selection = @getLastSelection()
selection.autoscroll()
selection.autoscroll() if @manageScrollPosition
selection
# Public: Set the selected range in buffer coordinates. If there are multiple