MCPcopy Create free account
hub / github.com/sql-js/sql.js / regLineChange

Function regLineChange

GUI/codemirror/lib/codemirror.js:2103–2114  ·  view source on GitHub ↗
(cm, line, type)

Source from the content-addressed store, hash-verified

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) {

Callers 5

highlightWorkerFunction · 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

Used in the wild real call sites across dependent graphs

searching dependent graphs…