MCPcopy Create free account
hub / github.com/ronreiter/interactive-tutorials / updateLine

Function updateLine

static/js/codemirror/codemirror.js:3837–3847  ·  view source on GitHub ↗
(line, text, markedSpans, estimateHeight)

Source from the content-addressed store, hash-verified

3835 }
3836
3837 function updateLine(line, text, markedSpans, estimateHeight) {
3838 line.text = text;
3839 if (line.stateAfter) line.stateAfter = null;
3840 if (line.styles) line.styles = null;
3841 if (line.order != null) line.order = null;
3842 detachMarkedSpans(line);
3843 attachMarkedSpans(line, markedSpans);
3844 var estHeight = estimateHeight ? estimateHeight(line) : 1;
3845 if (estHeight != line.height) updateLineHeight(line, estHeight);
3846 signalLater(line, "change");
3847 }
3848
3849 function cleanUpLine(line) {
3850 line.parent = null;

Callers 1

updateDocFunction · 0.85

Calls 5

detachMarkedSpansFunction · 0.85
attachMarkedSpansFunction · 0.85
estimateHeightFunction · 0.85
updateLineHeightFunction · 0.85
signalLaterFunction · 0.85

Tested by

no test coverage detected