(cm)
| 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) { |
no test coverage detected