fix CodeMirror global ref