(cm, line, type)
| 5655 | // Register a change to a single line. Type must be one of "text", |
| 5656 | // "gutter", "class", "widget" |
| 5657 | function regLineChange(cm, line, type) { |
| 5658 | cm.curOp.viewChanged = true |
| 5659 | var display = cm.display, |
| 5660 | ext = cm.display.externalMeasured |
| 5661 | if (ext && line >= ext.lineN && line < ext.lineN + ext.size) { |
| 5662 | display.externalMeasured = null |
| 5663 | } |
| 5664 | |
| 5665 | if (line < display.viewFrom || line >= display.viewTo) { |
| 5666 | return |
| 5667 | } |
| 5668 | var lineView = display.view[findViewIndex(cm, line)] |
| 5669 | if (lineView.node == null) { |
| 5670 | return |
| 5671 | } |
| 5672 | var arr = lineView.changes || (lineView.changes = []) |
| 5673 | if (indexOf(arr, type) == -1) { |
| 5674 | arr.push(type) |
| 5675 | } |
| 5676 | } |
| 5677 | |
| 5678 | // Clear the view. |
| 5679 | function resetView(cm) { |
no test coverage detected