mirror of
https://github.com/atom/atom.git
synced 2026-01-23 13:58:08 -05:00
Add Editor::setSelectedScreenRange
This commit is contained in:
@@ -1196,6 +1196,16 @@ class Editor extends Model
|
||||
setSelectedBufferRange: (bufferRange, options) ->
|
||||
@setSelectedBufferRanges([bufferRange], options)
|
||||
|
||||
# Public: Set the selected range in screen coordinates. If there are multiple
|
||||
# selections, they are reduced to a single selection with the given range.
|
||||
#
|
||||
# screenRange - A {Range} or range-compatible {Array}.
|
||||
# options - An options {Object}:
|
||||
# :reversed - A {Boolean} indicating whether to create the selection in a
|
||||
# reversed orientation.
|
||||
setSelectedScreenRange: (screenRange, options) ->
|
||||
@setSelectedBufferRange(@bufferRangeForScreenRange(screenRange, options), options)
|
||||
|
||||
# Public: Set the selected ranges in buffer coordinates. If there are multiple
|
||||
# selections, they are replaced by new selections with the given ranges.
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user