MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / resetModeState

Function resetModeState

lib/web/CodeMirror/src/display/mode_state.js:13–22  ·  view source on GitHub ↗
(cm)

Source from the content-addressed store, hash-verified

11}
12
13export function resetModeState(cm) {
14 cm.doc.iter(line => {
15 if (line.stateAfter) line.stateAfter = null
16 if (line.styles) line.styles = null
17 })
18 cm.doc.modeFrontier = cm.doc.highlightFrontier = cm.doc.first
19 startWorker(cm, 100)
20 cm.state.modeGen++
21 if (cm.curOp) regChange(cm)
22}

Callers 2

defineOptionsFunction · 0.90
loadModeFunction · 0.70

Calls 2

startWorkerFunction · 0.90
regChangeFunction · 0.90

Tested by

no test coverage detected