* Shift anchor AND focus by dRow, clamped to [minRow, maxRow]. Used by * keyboard scroll handlers (PgUp/PgDn etc.) so the highlight tracks the * content instead of disappearing. Unlike shiftAnchor (drag-to-scroll), * this moves BOTH endpoints — the user isn't holding the mouse at one * e
(dRow: number, minRow: number, maxRow: number)
| 1319 | * edge. Supplies screen.width for the col-reset-on-clamp boundary. |
| 1320 | */ |
| 1321 | shiftSelectionForScroll(dRow: number, minRow: number, maxRow: number): void { |
| 1322 | const hadSel = hasSelection(this.selection); |
| 1323 | shiftSelection(this.selection, dRow, minRow, maxRow, this.frontFrame.screen.width); |
| 1324 | // shiftSelection clears when both endpoints overshoot the same edge |
| 1325 | // (Home/g/End/G page-jump past the selection). Notify subscribers so |
| 1326 | // useHasSelection updates. Safe to call notifySelectionChange here — |
| 1327 | // this runs from keyboard handlers, not inside onRender(). |
| 1328 | if (hadSel && !hasSelection(this.selection)) { |
| 1329 | this.notifySelectionChange(); |
| 1330 | } |
| 1331 | } |
| 1332 | |
| 1333 | /** |
| 1334 | * Keyboard selection extension (shift+arrow/home/end). Moves focus; |
no test coverage detected