(doc, handle, changeType, op)
| 5471 | // returning the number and optionally registering the line as |
| 5472 | // changed. |
| 5473 | function changeLine(doc, handle, changeType, op) { |
| 5474 | var no = handle, line = handle; |
| 5475 | if (typeof handle == "number") { line = getLine(doc, clipLine(doc, handle)); } |
| 5476 | else { no = lineNo(handle); } |
| 5477 | if (no == null) { return null } |
| 5478 | if (op(line, no) && doc.cm) { regLineChange(doc.cm, no, changeType); } |
| 5479 | return line |
| 5480 | } |
| 5481 | |
| 5482 | // The document is represented as a BTree consisting of leaves, with |
| 5483 | // chunk of lines in them, and branches, with up to ten leaves or |
no test coverage detected