(doc, distance)
| 3400 | // Sub-views need their line numbers shifted when text is added |
| 3401 | // above or below them in the parent document. |
| 3402 | function shiftDoc(doc, distance) { |
| 3403 | doc.first += distance; |
| 3404 | doc.sel = new Selection(map(doc.sel.ranges, function(range) { |
| 3405 | return new Range(Pos(range.anchor.line + distance, range.anchor.ch), |
| 3406 | Pos(range.head.line + distance, range.head.ch)); |
| 3407 | }), doc.sel.primIndex); |
| 3408 | if (doc.cm) regChange(doc.cm, doc.first, doc.first - distance, distance); |
| 3409 | } |
| 3410 | |
| 3411 | // More lower-level change function, handling only a single document |
| 3412 | // (not linked ones). |
no test coverage detected
searching dependent graphs…