(doc, handle, changeType, op)
| 4794 | // returning the number and optionally registering the line as |
| 4795 | // changed. |
| 4796 | function changeLine(doc, handle, changeType, op) { |
| 4797 | var no = handle, line = handle; |
| 4798 | if (typeof handle == "number") line = getLine(doc, clipLine(doc, handle)); |
| 4799 | else no = lineNo(handle); |
| 4800 | if (no == null) return null; |
| 4801 | if (op(line, no) && doc.cm) regLineChange(doc.cm, no, changeType); |
| 4802 | return line; |
| 4803 | } |
| 4804 | |
| 4805 | // Helper for deleting text near the selection(s), used to implement |
| 4806 | // backspace, delete, and similar functionality. |
no test coverage detected