fixed out of date copy/paste operations with CodeMirror