Merge pull request #8604 from lpommers/pressing-esc-on-multiple-cursors-returns-to-original-cursor-or-selection

Pressing esc on multiple cursors returns to original cursor or selection
This commit is contained in:
Antonio Scandurra
2015-09-28 10:01:42 +02:00
2 changed files with 6 additions and 6 deletions

View File

@@ -2241,11 +2241,11 @@ class TextEditor extends Model
@consolidateSelections()
@getLastSelection().clear(options)
# Reduce multiple selections to the most recently added selection.
# Reduce multiple selections to the least recently added 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