Fix: set codeMirror instance into refresh fn