Cool, could you please check if https://github.com/sourcelair/CodeMirror/commit/72e3c92e37d107cb2d146a1e21311cc1cfd59a2d#diff-4b334edf14b1bb6080b9c2b2f1cf600aR22 works for you?