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

Function updateLineForChanges

GUI/codemirror/lib/codemirror.js:770–779  ·  view source on GitHub ↗
(cm, lineView, lineN, dims)

Source from the content-addressed store, hash-verified

768 // lineView.changes. This updates the relevant part of the line's
769 // DOM structure.
770 function updateLineForChanges(cm, lineView, lineN, dims) {
771 for (var j = 0; j < lineView.changes.length; j++) {
772 var type = lineView.changes[j];
773 if (type == "text") updateLineText(cm, lineView);
774 else if (type == "gutter") updateLineGutter(cm, lineView, lineN, dims);
775 else if (type == "class") updateLineClasses(lineView);
776 else if (type == "widget") updateLineWidgets(lineView, dims);
777 }
778 lineView.changes = null;
779 }
780
781 // Lines with gutter elements, widgets or a background class need to
782 // be wrapped, and have the extra elements added to the wrapper div

Callers 2

patchDisplayFunction · 0.85
prepareMeasureForLineFunction · 0.85

Calls 4

updateLineTextFunction · 0.85
updateLineGutterFunction · 0.85
updateLineClassesFunction · 0.85
updateLineWidgetsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…