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

Function updateLine

GUI/codemirror/lib/codemirror.js:5548–5557  ·  view source on GitHub ↗
(line, text, markedSpans, estimateHeight)

Source from the content-addressed store, hash-verified

5546 // invalidates cached information and tries to re-estimate the
5547 // line's height.
5548 function updateLine(line, text, markedSpans, estimateHeight) {
5549 line.text = text;
5550 if (line.stateAfter) line.stateAfter = null;
5551 if (line.styles) line.styles = null;
5552 if (line.order != null) line.order = null;
5553 detachMarkedSpans(line);
5554 attachMarkedSpans(line, markedSpans);
5555 var estHeight = estimateHeight ? estimateHeight(line) : 1;
5556 if (estHeight != line.height) updateLineHeight(line, estHeight);
5557 }
5558
5559 // Detach a line from the document tree and its markers.
5560 function cleanUpLine(line) {

Callers 1

updateFunction · 0.85

Calls 4

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

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…