mirror of
https://github.com/atom/atom.git
synced 2026-01-24 06:18:03 -05:00
Add deep copy to Range
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
Point = require 'point'
|
||||
_ = require 'underscore'
|
||||
|
||||
module.exports =
|
||||
class Range
|
||||
@@ -13,6 +14,9 @@ class Range
|
||||
@start = pointB
|
||||
@end = pointA
|
||||
|
||||
copy: (range) ->
|
||||
new Range(_.clone(@start), _.clone(@end))
|
||||
|
||||
toString: ->
|
||||
"[#{@start.toString()} - #{@end.toString()}]"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user