Is this block really necessary? It seems to be workarounding something on codemirror, and I actually can't tell the difference between having this calls and not having them. What difference does it make for you?

If the gain is minimal, I'd rather not have this hack here now and get a broken logic when/if it gets fixed in codemirror.