MCPcopy Index your code
hub / github.com/csev/py4e / attachDoc

Function attachDoc

tools/pythonauto/static/codemirrorepl/codemirror.js:6414–6423  ·  view source on GitHub ↗
(cm, doc)

Source from the content-addressed store, hash-verified

6412
6413 // Attach a document to an editor.
6414 function attachDoc(cm, doc) {
6415 if (doc.cm) throw new Error("This document is already in use.");
6416 cm.doc = doc;
6417 doc.cm = cm;
6418 estimateLineHeights(cm);
6419 loadMode(cm);
6420 if (!cm.options.lineWrapping) findMaxLine(cm);
6421 cm.options.mode = doc.modeOption;
6422 regChange(cm);
6423 }
6424
6425 // LINE UTILITIES
6426

Callers 2

CodeMirrorFunction · 0.70
codemirror.jsFile · 0.70

Calls 4

findMaxLineFunction · 0.85
estimateLineHeightsFunction · 0.70
loadModeFunction · 0.70
regChangeFunction · 0.70

Tested by

no test coverage detected