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

Function fromOperatorG

src/vim/transitions.ts:420–436  ·  view source on GitHub ↗
(
  state: { type: 'operatorG'; op: Operator; count: number },
  input: string,
  ctx: TransitionContext,
)

Source from the content-addressed store, hash-verified

418}
419
420function fromOperatorG(
421 state: { type: 'operatorG'; op: Operator; count: number },
422 input: string,
423 ctx: TransitionContext,
424): TransitionResult {
425 if (input === 'j' || input === 'k') {
426 return {
427 execute: () =>
428 executeOperatorMotion(state.op, `g${input}`, state.count, ctx),
429 }
430 }
431 if (input === 'g') {
432 return { execute: () => executeOperatorGg(state.op, state.count, ctx) }
433 }
434 // Any other input cancels the operator
435 return { next: { type: 'idle' } }
436}
437
438function fromReplace(
439 state: { type: 'replace'; count: number },

Callers 1

transitionFunction · 0.85

Calls 2

executeOperatorMotionFunction · 0.85
executeOperatorGgFunction · 0.85

Tested by

no test coverage detected