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

Function updateLineForChanges

src/codemirror.js:896–905  ·  view source on GitHub ↗
(cm, lineView, lineN, dims)

Source from the content-addressed store, hash-verified

894 // lineView.changes. This updates the relevant part of the line's
895 // DOM structure.
896 function updateLineForChanges(cm, lineView, lineN, dims) {
897 for (var j = 0; j < lineView.changes.length; j++) {
898 var type = lineView.changes[j];
899 if (type == "text") updateLineText(cm, lineView);
900 else if (type == "gutter") updateLineGutter(cm, lineView, lineN, dims);
901 else if (type == "class") updateLineClasses(lineView);
902 else if (type == "widget") updateLineWidgets(cm, lineView, dims);
903 }
904 lineView.changes = null;
905 }
906
907 // Lines with gutter elements, widgets or a background class need to
908 // 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
updateLineWidgetsFunction · 0.85
updateLineClassesFunction · 0.70

Tested by

no test coverage detected