i = result.nextIndex;
if (result.complete) {
const payload = this._pendingOsc;
this._pendingOsc = '';
// If it's a 633 sequence, extract event; otherwise put it back in cleaned.
this._handleOscPayload(payload, emitEvent, appendData, result.terminator);
} else if (result.pendingEsc) {
this._pendingEscInOsc = true;