mirror of
https://github.com/atom/atom.git
synced 2026-01-23 13:58:08 -05:00
Rename remaining pasteboard occurences
This commit is contained in:
@@ -1860,7 +1860,7 @@ describe "Editor", ->
|
||||
beforeEach ->
|
||||
editor.setSelectedBufferRanges([[[0, 4], [0, 13]], [[1, 6], [1, 10]]])
|
||||
|
||||
describe ".cutSelectedText()", ->
|
||||
fdescribe ".cutSelectedText()", ->
|
||||
it "removes the selected text from the buffer and places it on the clipboard", ->
|
||||
editor.cutSelectedText()
|
||||
expect(buffer.lineForRow(0)).toBe "var = function () {"
|
||||
|
||||
@@ -506,28 +506,28 @@ class Selection
|
||||
|
||||
# Public: Cuts the selection until the end of the line.
|
||||
#
|
||||
# * maintainPasteboard:
|
||||
# * maintainClipboard:
|
||||
# ?
|
||||
cutToEndOfLine: (maintainPasteboard) ->
|
||||
cutToEndOfLine: (maintainClipboard) ->
|
||||
@selectToEndOfLine() if @isEmpty()
|
||||
@cut(maintainPasteboard)
|
||||
@cut(maintainClipboard)
|
||||
|
||||
# Public: Copies the selection to the pasteboard and then deletes it.
|
||||
# Public: Copies the selection to the clipboard and then deletes it.
|
||||
#
|
||||
# * maintainPasteboard:
|
||||
# * maintainClipboard:
|
||||
# ?
|
||||
cut: (maintainPasteboard=false) ->
|
||||
@copy(maintainPasteboard)
|
||||
cut: (maintainClipboard=false) ->
|
||||
@copy(maintainClipboard)
|
||||
@delete()
|
||||
|
||||
# Public: Copies the current selection to the pasteboard.
|
||||
# Public: Copies the current selection to the clipboard.
|
||||
#
|
||||
# * maintainPasteboard:
|
||||
# * maintainClipboard:
|
||||
# ?
|
||||
copy: (maintainPasteboard=false) ->
|
||||
copy: (maintainClipboard=false) ->
|
||||
return if @isEmpty()
|
||||
text = @editor.buffer.getTextInRange(@getBufferRange())
|
||||
if maintainPasteboard
|
||||
if maintainClipboard
|
||||
text = atom.clipboard.read().text + '\n' + text
|
||||
else
|
||||
metadata = { indentBasis: @editor.indentationForBufferRow(@getBufferRange().start.row) }
|
||||
|
||||
Reference in New Issue
Block a user