MCPcopy Index your code
hub / github.com/codeaashu/claude-code / handleSelectionDrag

Method handleSelectionDrag

src/ink/ink.tsx:1348–1357  ·  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

1346 * altScreenActive for the same reason as dispatchClick.
1347 */
1348 handleSelectionDrag(col: number, row: number): void {
1349 if (!this.altScreenActive) return;
1350 const sel = this.selection;
1351 if (sel.anchorSpan) {
1352 extendSelection(sel, this.frontFrame.screen, col, row);
1353 } else {
1354 updateSelection(sel, col, row);
1355 }
1356 this.notifySelectionChange();
1357 }
1358
1359 // Methods to properly suspend stdin for external editor usage
1360 // 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