It'd be cool to send this patch to CodeMirror.