|
@@ 206-207 (lines=2) @@
|
| 203 |
|
|
| 204 |
|
protected function getNextNodeStart($current) { |
| 205 |
|
foreach($this->sortedNodes as $node) { |
| 206 |
|
if ($current >= $node['start'] && $current < $node['end']) |
| 207 |
|
return $node['end']; |
| 208 |
|
if ($current < $node['start']) |
| 209 |
|
return $node['start']; |
| 210 |
|
} |
|
@@ 219-221 (lines=3) @@
|
| 216 |
|
*/ |
| 217 |
|
protected function getNodeForPosition($pos) { |
| 218 |
|
foreach($this->sortedNodes as $node) { |
| 219 |
|
if ($pos >= $node['start'] && $pos < $node['end']) { |
| 220 |
|
return [$node, 0]; |
| 221 |
|
} |
| 222 |
|
} |
| 223 |
|
return [$this->backingNode, $pos]; |
| 224 |
|
} |