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

Function executeOperatorG

src/vim/operators.ts:524–539  ·  view source on GitHub ↗
(
  op: Operator,
  count: number,
  ctx: OperatorContext,
)

Source from the content-addressed store, hash-verified

522}
523
524export function executeOperatorG(
525 op: Operator,
526 count: number,
527 ctx: OperatorContext,
528): void {
529 // count=1 means no count given, target = end of file
530 // otherwise target = line N
531 const target =
532 count === 1 ? ctx.cursor.startOfLastLine() : ctx.cursor.goToLine(count)
533
534 if (target.equals(ctx.cursor)) return
535
536 const range = getOperatorRange(ctx.cursor, target, 'G', op, count)
537 applyOperator(op, range.from, range.to, ctx, range.linewise)
538 ctx.recordChange({ type: 'operator', op, motion: 'G', count })
539}
540
541export function executeOperatorGg(
542 op: Operator,

Callers 1

handleOperatorInputFunction · 0.85

Calls 5

getOperatorRangeFunction · 0.85
applyOperatorFunction · 0.85
startOfLastLineMethod · 0.80
goToLineMethod · 0.80
equalsMethod · 0.45

Tested by

no test coverage detected