()
| 85 | } |
| 86 | |
| 87 | _trim() { |
| 88 | // Throw away parts of the buffer we don't need anymore |
| 89 | // assert(this.cursor <= this.buffer.length) |
| 90 | this.buffer = this.buffer.slice(this.undoCursor) |
| 91 | this.cursor -= this.undoCursor |
| 92 | this._discardedBytes += this.undoCursor |
| 93 | this.undoCursor = 0 |
| 94 | } |
| 95 | |
| 96 | _moveCursor(n) { |
| 97 | this.undoCursor = this.cursor |