fix: refresh codemirror in next event loop