From de8d1d95d8f903b3e82829216d6e90be7b8946ba Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Thu, 9 Jul 2015 00:23:11 -0500 Subject: [PATCH] Add assertion about removing the last selection --- src/text-editor.coffee | 1 + 1 file changed, 1 insertion(+) diff --git a/src/text-editor.coffee b/src/text-editor.coffee index 152a70ab0..2f7b4de39 100644 --- a/src/text-editor.coffee +++ b/src/text-editor.coffee @@ -2245,6 +2245,7 @@ class TextEditor extends Model # Remove the given selection. removeSelection: (selection) -> _.remove(@selections, selection) + atom.assert @selections.length > 0, "Removed last selection" @emit 'selection-removed', selection if includeDeprecatedAPIs @emitter.emit 'did-remove-selection', selection