public/javascripts/codemirror/js/editor.js
function(safe) {
      // pagehide event hack above
      if (this.unloaded) {
        this.win.document.designMode = "off";
        this.win.document.designMode = "on";
        this.unloaded = false;
      }

      if (internetExplorer) {
        this.container.createTextRange().execCommand("unlink");
        this.selectionSnapshot = select.getBookmark(this.container);
      }

      var activity = this.options.cursorActivity;
      if (!safe || activity) {
        var cursor = select.selectionTopNode(this.container, false);
        if (cursor === false || !this.container.firstChild) return;
        cursor = cursor || this.container.firstChild;
        if (activity) activity(cursor);
        if (!safe) {
          this.scheduleHighlight();
          this.addDirtyNode(cursor);
        }
      }
    }
function(safe) {
      // pagehide event hack above
      if (this.unloaded) {
        this.win.document.designMode = "off";
        this.win.document.designMode = "on";
        this.unloaded = false;
      }

      if (internetExplorer) {
        this.container.createTextRange().execCommand("unlink");
        this.selectionSnapshot = select.getBookmark(this.container);
      }

      var activity = this.options.cursorActivity;
      if (!safe || activity) {
        var cursor = select.selectionTopNode(this.container, false);
        if (cursor === false || !this.container.firstChild) return;
        cursor = cursor || this.container.firstChild;
        if (activity) activity(cursor);
        if (!safe) {
          this.scheduleHighlight();
          this.addDirtyNode(cursor);
        }
      }
    }
function ( safe ) { // pagehide event hack above if ( this . unloaded ) { this . win . document . designMode = "off" ; this . win . document . designMode = "on" ; this . unloaded = false ; } if ( internetExplorer ) { this . container . createTextRange ( ) . execCommand ( "unlink" ) ; this . selectionSnapshot = select . getBookmark ( this . container ) ; } var activity = this . options . cursorActivity ; if ( ! safe || activity ) { var cursor = select . selectionTopNode ( this . container , false ) ; if ( cursor === false || ! this . container . firstChild ) return ; cursor = cursor || this . container . firstChild ; if ( activity ) activity ( cursor ) ; if ( ! safe ) { this . scheduleHighlight ( ) ; this . addDirtyNode ( cursor ) ; } } }
Find the node that the cursor is in, mark it as dirty, and make sure a highlight pass is scheduled.
Find the node that the cursor is in mark it as dirty and make sure a highlight pass is scheduled .