mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-11-14 04:29:04 +03:00
Backspace works with multiple selections
This commit is contained in:
parent
29a2cc5886
commit
553194dc9e
@ -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", ->
|
||||
|
@ -35,7 +35,7 @@ class CompositeSeleciton
|
||||
selection.insertText(text)
|
||||
|
||||
backspace: ->
|
||||
for selection in @getSelections()
|
||||
@modifySelections (selection) ->
|
||||
selection.backspace()
|
||||
|
||||
delete: ->
|
||||
|
Loading…
Reference in New Issue
Block a user