mirror of
https://github.com/atom/atom.git
synced 2026-02-06 20:55:33 -05:00
Move backspace, delete, and pasteboard operations specs to edit-session-spec
This commit is contained in:
@@ -152,18 +152,21 @@ class EditSession
|
||||
selection.cutToEndOfLine(maintainPasteboard)
|
||||
maintainPasteboard = true
|
||||
|
||||
cut: ->
|
||||
cutSelectedText: ->
|
||||
maintainPasteboard = false
|
||||
@mutateSelectedText (selection) ->
|
||||
selection.cut(maintainPasteboard)
|
||||
maintainPasteboard = true
|
||||
|
||||
copy: ->
|
||||
copySelectedText: ->
|
||||
maintainPasteboard = false
|
||||
for selection in @getSelections()
|
||||
selection.copy(maintainPasteboard)
|
||||
maintainPasteboard = true
|
||||
|
||||
pasteText: ->
|
||||
@insertText($native.readFromPasteboard())
|
||||
|
||||
foldSelection: ->
|
||||
selection.fold() for selection in @getSelections()
|
||||
|
||||
|
||||
@@ -750,9 +750,9 @@ class Editor extends View
|
||||
backwardsScanInRange: (args...) -> @buffer.backwardsScanInRange(args...)
|
||||
|
||||
|
||||
cutSelection: -> @activeEditSession.cut()
|
||||
copySelection: -> @activeEditSession.copy()
|
||||
paste: -> @insertText($native.readFromPasteboard())
|
||||
cutSelection: -> @activeEditSession.cutSelectedText()
|
||||
copySelection: -> @activeEditSession.copySelectedText()
|
||||
paste: -> @activeEditSession.pasteText()
|
||||
|
||||
undo: ->
|
||||
if ranges = @buffer.undo()
|
||||
|
||||
Reference in New Issue
Block a user