I thought of another possible solution. Is there anyway to force CodeMirror to synchronously handle `readInput()`? I think that would handle all cases.