(cm, line, type)
| 76 | // Register a change to a single line. Type must be one of "text", |
| 77 | // "gutter", "class", "widget" |
| 78 | export function regLineChange(cm, line, type) { |
| 79 | cm.curOp.viewChanged = true |
| 80 | let display = cm.display, ext = cm.display.externalMeasured |
| 81 | if (ext && line >= ext.lineN && line < ext.lineN + ext.size) |
| 82 | display.externalMeasured = null |
| 83 | |
| 84 | if (line < display.viewFrom || line >= display.viewTo) return |
| 85 | let lineView = display.view[findViewIndex(cm, line)] |
| 86 | if (lineView.node == null) return |
| 87 | let arr = lineView.changes || (lineView.changes = []) |
| 88 | if (indexOf(arr, type) == -1) arr.push(type) |
| 89 | } |
| 90 | |
| 91 | // Clear the view. |
| 92 | export function resetView(cm) { |
no test coverage detected