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

Function loadMode

static/js/codemirror/codemirror.js:192–202  ·  view source on GitHub ↗
(cm)

Source from the content-addressed store, hash-verified

190 // Used to get the editor into a consistent state again when options change.
191
192 function loadMode(cm) {
193 cm.doc.mode = CodeMirror.getMode(cm.options, cm.doc.modeOption);
194 cm.doc.iter(function(line) {
195 if (line.stateAfter) line.stateAfter = null;
196 if (line.styles) line.styles = null;
197 });
198 cm.doc.frontier = cm.doc.first;
199 startWorker(cm, 100);
200 cm.state.modeGen++;
201 if (cm.curOp) regChange(cm);
202 }
203
204 function wrappingChanged(cm) {
205 if (cm.options.lineWrapping) {

Callers 2

codemirror.jsFile · 0.85
attachDocFunction · 0.85

Calls 2

startWorkerFunction · 0.85
regChangeFunction · 0.85

Tested by

no test coverage detected