(cm, line, type)
| 2087 | // Register a change to a single line. Type must be one of "text", |
| 2088 | // "gutter", "class", "widget" |
| 2089 | function regLineChange(cm, line, type) { |
| 2090 | cm.curOp.viewChanged = true; |
| 2091 | var display = cm.display, ext = cm.display.externalMeasured; |
| 2092 | if (ext && line >= ext.lineN && line < ext.lineN + ext.size) |
| 2093 | display.externalMeasured = null; |
| 2094 | |
| 2095 | if (line < display.viewFrom || line >= display.viewTo) return; |
| 2096 | var lineView = display.view[findViewIndex(cm, line)]; |
| 2097 | if (lineView.node == null) return; |
| 2098 | var arr = lineView.changes || (lineView.changes = []); |
| 2099 | if (indexOf(arr, type) == -1) arr.push(type); |
| 2100 | } |
| 2101 | |
| 2102 | // Clear the view. |
| 2103 | function resetView(cm) { |
no test coverage detected