mirror of
https://github.com/atom/atom.git
synced 2026-02-14 00:25:08 -05:00
Merge pull request #8828 from atom/iz-cut-to-end-of-buffer-line
Add command for cutting text to the end of the cursor's buffer line
This commit is contained in:
@@ -2665,7 +2665,7 @@ class TextEditor extends Model
|
||||
@emitter.emit 'did-insert-text', didInsertEvent
|
||||
|
||||
# Essential: For each selection, if the selection is empty, cut all characters
|
||||
# of the containing line following the cursor. Otherwise cut the selected
|
||||
# of the containing screen line following the cursor. Otherwise cut the selected
|
||||
# text.
|
||||
cutToEndOfLine: ->
|
||||
maintainClipboard = false
|
||||
@@ -2673,6 +2673,15 @@ class TextEditor extends Model
|
||||
selection.cutToEndOfLine(maintainClipboard)
|
||||
maintainClipboard = true
|
||||
|
||||
# Essential: For each selection, if the selection is empty, cut all characters
|
||||
# of the containing buffer line following the cursor. Otherwise cut the
|
||||
# selected text.
|
||||
cutToEndOfBufferLine: ->
|
||||
maintainClipboard = false
|
||||
@mutateSelectedText (selection) ->
|
||||
selection.cutToEndOfBufferLine(maintainClipboard)
|
||||
maintainClipboard = true
|
||||
|
||||
###
|
||||
Section: Folds
|
||||
###
|
||||
|
||||
Reference in New Issue
Block a user