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

Function selectWordAt

src/ink/selection.ts:240–254  ·  view source on GitHub ↗
(
  s: SelectionState,
  screen: Screen,
  col: number,
  row: number,
)

Source from the content-addressed store, hash-verified

238 * selection word-by-word (native macOS behavior).
239 */
240export function selectWordAt(
241 s: SelectionState,
242 screen: Screen,
243 col: number,
244 row: number,
245): void {
246 const b = wordBoundsAt(screen, col, row)
247 if (!b) return
248 const lo = { col: b.lo, row }
249 const hi = { col: b.hi, row }
250 s.anchor = lo
251 s.focus = hi
252 s.isDragging = true
253 s.anchorSpan = { lo, hi, kind: 'word' }
254}
255
256// Printable ASCII minus terminal URL delimiters. Restricting to single-
257// codeunit ASCII keeps cell-count === string-index, so the column-span

Callers 1

handleMultiClickMethod · 0.85

Calls 1

wordBoundsAtFunction · 0.85

Tested by

no test coverage detected