Add documentation for Selection.expandOver*

This commit is contained in:
Matt Colyer
2013-08-28 15:39:08 -07:00
parent c8b7040144
commit 9fe9e0dc41
2 changed files with 7 additions and 11 deletions

View File

@@ -1275,9 +1275,7 @@ class EditSession
joinLine: ->
@mutateSelectedText (selection) -> selection.joinLine()
# Public:
#
# FIXME: No idea what this does.
# {Delegates to: Selection.expandOverLine}
expandLastSelectionOverLine: ->
@getLastSelection().expandOverLine()
@@ -1300,9 +1298,7 @@ class EditSession
selectWord: ->
@expandSelectionsForward (selection) => selection.selectWord()
# Public:
#
# FIXME: No idea what this does.
# {Delegates to: Selection.expandOverWord}
expandLastSelectionOverWord: ->
@getLastSelection().expandOverWord()

View File

@@ -120,9 +120,8 @@ class Selection
@wordwise = true
@initialScreenRange = @getScreenRange()
# Public:
#
# FIXME: I have no idea what this does.
# Public: Expands the newest selection to include the entire word on which
# the cursors rests.
expandOverWord: ->
@setBufferRange(@getBufferRange().union(@cursor.getCurrentWordBufferRange()))
@@ -137,9 +136,10 @@ class Selection
@wordwise = false
@initialScreenRange = @getScreenRange()
# Public:
# Public: Expands the newest selection to include the entire line on which
# the cursor currently rests.
#
# FIXME: I have no idea what this does.
# It also includes the newline character.
expandOverLine: ->
range = @getBufferRange().union(@cursor.getCurrentLineBufferRange(includeNewline: true))
@setBufferRange(range)