(doc, handle, changeType, op)
| 330 | // returning the number and optionally registering the line as |
| 331 | // changed. |
| 332 | export function changeLine(doc, handle, changeType, op) { |
| 333 | let no = handle, line = handle |
| 334 | if (typeof handle == "number") line = getLine(doc, clipLine(doc, handle)) |
| 335 | else no = lineNo(handle) |
| 336 | if (no == null) return null |
| 337 | if (op(line, no) && doc.cm) regLineChange(doc.cm, no, changeType) |
| 338 | return line |
| 339 | } |
no test coverage detected