diff --git a/spec/atom/editor-spec.coffee b/spec/atom/editor-spec.coffee index 664c8fdd0..2914d1f10 100644 --- a/spec/atom/editor-spec.coffee +++ b/spec/atom/editor-spec.coffee @@ -916,11 +916,11 @@ describe "Editor", -> describe "when selections are on the same line", -> it "removes all selected text", -> editor.setSelectionBufferRange([[0,4], [0,13]]) - editor.addSelectionForBufferRange([[0,22], [0,24]]) + editor.addSelectionForBufferRange([[0,16], [0,24]]) editor.backspace() - expect(editor.lineForBufferRow(0)).toBe 'var = functio () {' + expect(editor.lineForBufferRow(0)).toBe 'var = () {' describe "delete", -> describe "when cursors are on the same line", -> diff --git a/src/atom/composite-selection.coffee b/src/atom/composite-selection.coffee index 8f44d33f5..ee3962c2f 100644 --- a/src/atom/composite-selection.coffee +++ b/src/atom/composite-selection.coffee @@ -35,7 +35,7 @@ class CompositeSeleciton selection.insertText(text) backspace: -> - for selection in @getSelections() + @modifySelections (selection) -> selection.backspace() delete: ->