Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Replace the body of ::toDelta method with @getExent(). #113

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions src/range.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -298,13 +298,7 @@ class Range
Section: Conversion
###

toDelta: ->
rows = @end.row - @start.row
if rows == 0
columns = @end.column - @start.column
else
columns = @end.column
new Point(rows, columns)
toDelta: -> @getExtent()

# Public: Returns a string representation of the range.
toString: ->
Expand Down