(other)
| 15 | primary() { return this.ranges[this.primIndex] } |
| 16 | |
| 17 | equals(other) { |
| 18 | if (other == this) return true |
| 19 | if (other.primIndex != this.primIndex || other.ranges.length != this.ranges.length) return false |
| 20 | for (let i = 0; i < this.ranges.length; i++) { |
| 21 | let here = this.ranges[i], there = other.ranges[i] |
| 22 | if (!equalCursorPos(here.anchor, there.anchor) || !equalCursorPos(here.head, there.head)) return false |
| 23 | } |
| 24 | return true |
| 25 | } |
| 26 | |
| 27 | deepCopy() { |
| 28 | let out = [] |
no test coverage detected