MCPcopy
hub / github.com/csev/py4e / regLineChange

Function regLineChange

tools/pythonauto/static/codemirrorepl/codemirror.js:2089–2100  ·  view source on GitHub ↗
(cm, line, type)

Source from the content-addressed store, hash-verified

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

Callers 5

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

Calls 2

findViewIndexFunction · 0.85
indexOfFunction · 0.70

Tested by

no test coverage detected