| 148 | |
| 149 | // Note: storageLimit is skipped here to not intoduce a surprising side effect. |
| 150 | public reset(): boolean { |
| 151 | // reset options customizable by sequences to defaults |
| 152 | this._opts.sixelScrolling = this._defaultOpts.sixelScrolling; |
| 153 | this._opts.sixelPaletteLimit = this._defaultOpts.sixelPaletteLimit; |
| 154 | // also clear image storage |
| 155 | this._storage?.reset(); |
| 156 | // reset protocol handlers |
| 157 | for (const handler of this._handlers.values()) { |
| 158 | handler.reset(); |
| 159 | } |
| 160 | return false; |
| 161 | } |
| 162 | |
| 163 | public get storageLimit(): number { |
| 164 | return this._storage?.getLimit() || -1; |