MCPcopy Index your code
hub / github.com/claude-code-best/claude-code / executeOperatorMotion

Function executeOperatorMotion

src/vim/operators.ts:42–54  ·  view source on GitHub ↗
(
  op: Operator,
  motion: string,
  count: number,
  ctx: OperatorContext,
)

Source from the content-addressed store, hash-verified

40 * Execute an operator with a simple motion.
41 */
42export function executeOperatorMotion(
43 op: Operator,
44 motion: string,
45 count: number,
46 ctx: OperatorContext,
47): void {
48 const target = resolveMotion(motion, ctx.cursor, count)
49 if (target.equals(ctx.cursor)) return
50
51 const range = getOperatorRange(ctx.cursor, target, motion, op, count)
52 applyOperator(op, range.from, range.to, ctx, range.linewise)
53 ctx.recordChange({ type: 'operator', op, motion, count })
54}
55
56/**
57 * Execute an operator with a find motion.

Callers 4

handleNormalInputFunction · 0.85
handleOperatorInputFunction · 0.85
fromOperatorGFunction · 0.85
replayLastChangeFunction · 0.85

Calls 4

resolveMotionFunction · 0.85
getOperatorRangeFunction · 0.85
applyOperatorFunction · 0.85
equalsMethod · 0.45

Tested by

no test coverage detected