🎨 Rename to TextEditor#mergeSelectionsOnSameRows

* 🔥 Delete `Selection#intersectsByRowWith`
This commit is contained in:
Antonio Scandurra
2015-04-07 12:24:41 +02:00
parent 59a5dc42a8
commit 5e5acb7432
2 changed files with 3 additions and 15 deletions

View File

@@ -162,18 +162,6 @@ class Selection extends Model
intersectsScreenRow: (screenRow) ->
@getScreenRange().intersectsRow(screenRow)
# Public: Identifies if this selection's rows intersects with another selection's rows.
#
# * `otherSelection` A {Selection} to check against.
#
# Returns a {Boolean}
intersectsByRowWith: (otherSelection) ->
otherScreenRange = otherSelection.getScreenRange()
@getScreenRange().intersectsRowRange(
otherScreenRange.start.row, otherScreenRange.end.row
)
# Public: Identifies if a selection intersects with another selection.
#
# * `otherSelection` A {Selection} to check against.

View File

@@ -1026,7 +1026,7 @@ class TextEditor extends Model
# Extended: Delete all lines intersecting selections.
deleteLine: ->
@mergeIntersectingSelectionsByRow()
@mergeSelectionsOnSameRows()
@mutateSelectedText (selection) -> selection.deleteLine()
###
@@ -2054,9 +2054,9 @@ class TextEditor extends Model
previousSelection.intersectsWith(currentSelection, exclusive)
mergeIntersectingSelectionsByRow: (args...) ->
mergeSelectionsOnSameRows: (args...) ->
@mergeSelections args..., (previousSelection, currentSelection) ->
previousSelection.intersectsByRowWith(currentSelection)
previousSelection.intersectsScreenRowRange(currentSelection.getBufferRowRange()...)
mergeSelections: (args...) ->
mergePredicate = args.pop()