Some CodeMirror fixes