MCPcopy Create free account
hub / github.com/Noumena-Network/code / handleSelectionDrag

Method handleSelectionDrag

src/ink/ink.tsx:1501–1510  ·  view source on GitHub ↗

* Handle a drag-motion at (col, row). In char mode updates focus to the * exact cell. In word/line mode snaps to word/line boundaries so the * selection extends by word/line like native macOS. Gated on * altScreenActive for the same reason as dispatchClick.

(col: number, row: number)

Source from the content-addressed store, hash-verified

1499 * altScreenActive for the same reason as dispatchClick.
1500 */
1501 handleSelectionDrag(col: number, row: number): void {
1502 if (!this.altScreenActive) return;
1503 const sel = this.selection;
1504 if (sel.anchorSpan) {
1505 extendSelection(sel, this.frontFrame.screen, col, row);
1506 } else {
1507 updateSelection(sel, col, row);
1508 }
1509 this.notifySelectionChange();
1510 }
1511
1512 // Methods to properly suspend stdin for external editor usage
1513 // This is needed to prevent Ink from swallowing keystrokes when an external editor is active

Callers

nothing calls this directly

Calls 3

notifySelectionChangeMethod · 0.95
extendSelectionFunction · 0.85
updateSelectionFunction · 0.85

Tested by

no test coverage detected