mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
updated docstring
This commit is contained in:
@@ -690,10 +690,10 @@ class Editor extends Model
|
||||
delete: ->
|
||||
@mutateSelectedText (selection) -> selection.delete()
|
||||
|
||||
# Public: For each selection, if the selection is empty, delete all characters
|
||||
# of the containing line following the cursor, or if the cursor is at the end
|
||||
# of the line, delete the following newline. If not empty, delete the
|
||||
# selected text.
|
||||
# Public: For each selection, if the selection is not empty, deletes the
|
||||
# selection; otherwise, deletes all characters of the containing line
|
||||
# following the cursor. If the cursor is already at the end of the line,
|
||||
# deletes the following newline.
|
||||
deleteToEndOfLine: ->
|
||||
@mutateSelectedText (selection) -> selection.deleteToEndOfLine()
|
||||
|
||||
|
||||
@@ -430,10 +430,10 @@ class Selection extends Model
|
||||
@selectRight()
|
||||
@deleteSelectedText()
|
||||
|
||||
# Public: If nothing selected, removes all characters from cursor
|
||||
# until the end of the current line, unless already at the end of
|
||||
# the line, in which case removes the following newline.
|
||||
# If there is a selection, deletes only the selection.
|
||||
# Public: If the selection is empty, removes all text from the cursor to the
|
||||
# end of the line. If the cursor is already at the end of the line, it
|
||||
# removes the following newline. If the selection isn't empty, only deletes
|
||||
# the contents of the selection.
|
||||
deleteToEndOfLine: ->
|
||||
return @delete() if @isEmpty() and @cursor.isAtEndOfLine()
|
||||
@selectToEndOfLine() if @isEmpty()
|
||||
|
||||
Reference in New Issue
Block a user