code: function onCursorActivity() {
        var macroModeState = vimGlobalState.macroModeState;
        var lastChange = macroModeState.lastInsertModeChanges;
        if (lastChange.expectCursorActivityForChange) {
          lastChange.expectCursorActivityForChange = false;
        } else {
          // Cursor moved outside the context of an edit. Reset the change.
          lastChange.changes = [];
        }
      }
docs: Listens for any kind of cursor activity on CodeMirror.
  - For tracking cursor activity in insert mode.
  - Should only be active in insert mode.