mirror of
https://github.com/atom/atom.git
synced 2026-02-12 15:45:23 -05:00
reduce multiple cursors/selections to the first, original, cursor/selection
This commit is contained in:
@@ -2270,11 +2270,11 @@ class TextEditor extends Model
|
||||
@consolidateSelections()
|
||||
@getLastSelection().clear(options)
|
||||
|
||||
# Reduce multiple selections to the most recently added selection.
|
||||
# Reduce multiple selections to the first, original selection.
|
||||
consolidateSelections: ->
|
||||
selections = @getSelections()
|
||||
if selections.length > 1
|
||||
selection.destroy() for selection in selections[0...-1]
|
||||
selection.destroy() for selection in selections[1...(selections.length)]
|
||||
true
|
||||
else
|
||||
false
|
||||
|
||||
Reference in New Issue
Block a user