mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-20 15:37:46 +03:00
reduce multiple cursors/selections to the first, original, cursor/selection
This commit is contained in:
parent
9b719056e0
commit
193fd14e79
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user