MCPcopy Create free account
hub / github.com/TruthHun/BookStack / regLineChange

Function regLineChange

static/mergely/lib/codemirror.js:3306–3317  ·  view source on GitHub ↗
(cm, line, type)

Source from the content-addressed store, hash-verified

3304 // Register a change to a single line. Type must be one of "text",
3305 // "gutter", "class", "widget"
3306 function regLineChange(cm, line, type) {
3307 cm.curOp.viewChanged = true;
3308 var display = cm.display, ext = cm.display.externalMeasured;
3309 if (ext && line >= ext.lineN && line < ext.lineN + ext.size)
3310 display.externalMeasured = null;
3311
3312 if (line < display.viewFrom || line >= display.viewTo) return;
3313 var lineView = display.view[findViewIndex(cm, line)];
3314 if (lineView.node == null) return;
3315 var arr = lineView.changes || (lineView.changes = []);
3316 if (indexOf(arr, type) == -1) arr.push(type);
3317 }
3318
3319 // Clear the view.
3320 function resetView(cm) {

Callers 6

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

Calls 2

findViewIndexFunction · 0.70
indexOfFunction · 0.70

Tested by

no test coverage detected