(doc, handle, changeType, op)
| 7482 | // returning the number and optionally registering the line as |
| 7483 | // changed. |
| 7484 | function changeLine(doc, handle, changeType, op) { |
| 7485 | var no = handle, |
| 7486 | line = handle |
| 7487 | if (typeof handle == "number") { |
| 7488 | line = getLine(doc, clipLine(doc, handle)) |
| 7489 | } else { |
| 7490 | no = lineNo(handle) |
| 7491 | } |
| 7492 | if (no == null) { |
| 7493 | return null |
| 7494 | } |
| 7495 | if (op(line, no) && doc.cm) { |
| 7496 | regLineChange(doc.cm, no, changeType) |
| 7497 | } |
| 7498 | return line |
| 7499 | } |
| 7500 | |
| 7501 | // The document is represented as a BTree consisting of leaves, with |
| 7502 | // chunk of lines in them, and branches, with up to ten leaves or |
no test coverage detected