Fixed bug when typing multiple lines in CodeMirror