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

Function shift

src/ink/selection.ts:540–544  ·  view source on GitHub ↗
(p: Point, vRow: number)

Source from the content-addressed store, hash-verified

538 // means a top-clamped point can stay top-clamped during a dRow>0 reverse
539 // shift — dRow-based clampCol would give it the bottom col.
540 const shift = (p: Point, vRow: number): Point => {
541 if (vRow < minRow) return { col: 0, row: minRow }
542 if (vRow > maxRow) return { col: width - 1, row: maxRow }
543 return { col: p.col, row: vRow }
544 }
545 s.anchor = shift(s.anchor, vAnchor)
546 s.focus = shift(s.focus, vFocus)
547 s.virtualAnchorRow =

Callers 3

shiftSelectionFunction · 0.85
shiftAnchorFunction · 0.85
shiftSelectionForFollowFunction · 0.85

Calls 1

clampFunction · 0.85

Tested by

no test coverage detected