MCPcopy
hub / github.com/witheve/Eve / regLineChange

Function regLineChange

src/codemirror.js:3327–3338  ·  view source on GitHub ↗
(cm, line, type)

Source from the content-addressed store, hash-verified

3325 // Register a change to a single line. Type must be one of "text",
3326 // "gutter", "class", "widget"
3327 function regLineChange(cm, line, type) {
3328 cm.curOp.viewChanged = true;
3329 var display = cm.display, ext = cm.display.externalMeasured;
3330 if (ext && line >= ext.lineN && line < ext.lineN + ext.size)
3331 display.externalMeasured = null;
3332
3333 if (line < display.viewFrom || line >= display.viewTo) return;
3334 var lineView = display.view[findViewIndex(cm, line)];
3335 if (lineView.node == null) return;
3336 var arr = lineView.changes || (lineView.changes = []);
3337 if (indexOf(arr, type) == -1) arr.push(type);
3338 }
3339
3340 // Clear the view.
3341 function resetView(cm) {

Callers 6

highlightWorkerFunction · 0.85
shiftDocFunction · 0.85
changeLineFunction · 0.85
codemirror.jsFile · 0.85
markTextFunction · 0.85

Calls 2

findViewIndexFunction · 0.85
indexOfFunction · 0.85

Tested by

no test coverage detected