Revert "Sometimes there might not be a selection."

This reverts commit a73e6e5bd0.
This commit is contained in:
Ben Ogle
2014-08-12 15:54:32 -07:00
parent 96804096e9
commit f0fbdc9842

View File

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