MCPcopy Create free account
hub / github.com/TruthHun/BookStack / resetModeState

Function resetModeState

static/editor.md/lib/codemirror/lib/codemirror.js:237–246  ·  view source on GitHub ↗
(cm)

Source from the content-addressed store, hash-verified

235 }
236
237 function resetModeState(cm) {
238 cm.doc.iter(function(line) {
239 if (line.stateAfter) line.stateAfter = null;
240 if (line.styles) line.styles = null;
241 });
242 cm.doc.frontier = cm.doc.first;
243 startWorker(cm, 100);
244 cm.state.modeGen++;
245 if (cm.curOp) regChange(cm);
246 }
247
248 function wrappingChanged(cm) {
249 if (cm.options.lineWrapping) {

Callers 2

loadModeFunction · 0.70
codemirror.jsFile · 0.70

Calls 2

startWorkerFunction · 0.70
regChangeFunction · 0.70

Tested by

no test coverage detected