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

Function resolveMotion

src/vim/motions.ts:13–25  ·  view source on GitHub ↗
(
  key: string,
  cursor: Cursor,
  count: number,
)

Source from the content-addressed store, hash-verified

11 * Does not modify anything - pure calculation.
12 */
13export function resolveMotion(
14 key: string,
15 cursor: Cursor,
16 count: number,
17): Cursor {
18 let result = cursor
19 for (let i = 0; i < count; i++) {
20 const next = applySingleMotion(key, result)
21 if (next.equals(result)) break
22 result = next
23 }
24 return result
25}
26
27/**
28 * Apply a single motion step.

Callers 3

executeOperatorMotionFunction · 0.85
handleNormalInputFunction · 0.85
fromGFunction · 0.85

Calls 2

applySingleMotionFunction · 0.85
equalsMethod · 0.45

Tested by

no test coverage detected