(cm, line, type)
| 2101 | // Register a change to a single line. Type must be one of "text", |
| 2102 | // "gutter", "class", "widget" |
| 2103 | function regLineChange(cm, line, type) { |
| 2104 | cm.curOp.viewChanged = true; |
| 2105 | var display = cm.display, ext = cm.display.externalMeasured; |
| 2106 | if (ext && line >= ext.lineN && line < ext.lineN + ext.size) |
| 2107 | display.externalMeasured = null; |
| 2108 | |
| 2109 | if (line < display.viewFrom || line >= display.viewTo) return; |
| 2110 | var lineView = display.view[findViewIndex(cm, line)]; |
| 2111 | if (lineView.node == null) return; |
| 2112 | var arr = lineView.changes || (lineView.changes = []); |
| 2113 | if (indexOf(arr, type) == -1) arr.push(type); |
| 2114 | } |
| 2115 | |
| 2116 | // Clear the view. |
| 2117 | function resetView(cm) { |
no test coverage detected
searching dependent graphs…