Function
selectLineAt
(
s: SelectionState,
screen: Screen,
row: number,
)
Source from the content-addressed store, hash-verified
| 366 | * line content. |
| 367 | */ |
| 368 | export function selectLineAt( |
| 369 | s: SelectionState, |
| 370 | screen: Screen, |
| 371 | row: number, |
| 372 | ): void { |
| 373 | if (row < 0 || row >= screen.height) return |
| 374 | const lo = { col: 0, row } |
| 375 | const hi = { col: screen.width - 1, row } |
| 376 | s.anchor = lo |
| 377 | s.focus = hi |
| 378 | s.isDragging = true |
| 379 | s.anchorSpan = { lo, hi, kind: 'line' } |
| 380 | } |
| 381 | |
| 382 | /** |
| 383 | * Extend a word/line-mode selection to the word/line at (col, row). The |
Tested by
no test coverage detected