| 236 | } |
| 237 | |
| 238 | getCell(x: number): IBufferCell | undefined { |
| 239 | if (x < 0 || x >= this._length) { |
| 240 | return undefined; |
| 241 | } |
| 242 | |
| 243 | if (x >= this.cells.length) { |
| 244 | // Cell beyond what was returned (empty/null cell) |
| 245 | return new BufferCell( |
| 246 | { |
| 247 | codepoint: 0, |
| 248 | fg_r: 204, |
| 249 | fg_g: 204, |
| 250 | fg_b: 204, |
| 251 | bg_r: 0, |
| 252 | bg_g: 0, |
| 253 | bg_b: 0, |
| 254 | flags: 0, |
| 255 | width: 1, |
| 256 | hyperlink_id: 0, |
| 257 | grapheme_len: 0, |
| 258 | }, |
| 259 | x |
| 260 | ); |
| 261 | } |
| 262 | |
| 263 | return new BufferCell(this.cells[x], x); |
| 264 | } |
| 265 | |
| 266 | translateToString(trimRight = false, startColumn = 0, endColumn = this._length): string { |
| 267 | // Clamp bounds |