* Select entire lines from start to end * xterm.js compatible API
(start: number, end: number)
| 286 | * xterm.js compatible API |
| 287 | */ |
| 288 | selectLines(start: number, end: number): void { |
| 289 | const dims = this.wasmTerm.getDimensions(); |
| 290 | |
| 291 | // Clamp to valid row ranges |
| 292 | start = Math.max(0, Math.min(start, dims.rows - 1)); |
| 293 | end = Math.max(0, Math.min(end, dims.rows - 1)); |
| 294 | |
| 295 | // Ensure start <= end |
| 296 | if (start > end) { |
| 297 | [start, end] = [end, start]; |
| 298 | } |
| 299 | |
| 300 | // Convert viewport rows to absolute rows |
| 301 | const viewportY = this.getViewportY(); |
| 302 | this.selectionStart = { col: 0, absoluteRow: viewportY + start }; |
| 303 | this.selectionEnd = { col: dims.cols - 1, absoluteRow: viewportY + end }; |
| 304 | this.requestRender(); |
| 305 | this.selectionChangedEmitter.fire(); |
| 306 | } |
| 307 | |
| 308 | /** |
| 309 | * Get selection position as buffer range |
nothing calls this directly
no test coverage detected