mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Merge pull request #4148 from atom/mb-cut-line
Cut whole lines when no text is selected
This commit is contained in:
@@ -2463,6 +2463,7 @@ class TextEditor extends Model
|
||||
copySelectedText: ->
|
||||
maintainClipboard = false
|
||||
for selection in @getSelections()
|
||||
selection.selectLine() if selection.isEmpty()
|
||||
selection.copy(maintainClipboard)
|
||||
maintainClipboard = true
|
||||
|
||||
@@ -2470,6 +2471,7 @@ class TextEditor extends Model
|
||||
cutSelectedText: ->
|
||||
maintainClipboard = false
|
||||
@mutateSelectedText (selection) ->
|
||||
selection.selectLine() if selection.isEmpty()
|
||||
selection.cut(maintainClipboard)
|
||||
maintainClipboard = true
|
||||
|
||||
|
||||
Reference in New Issue
Block a user