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

Function executeOperatorGg

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

Source from the content-addressed store, hash-verified

539}
540
541export function executeOperatorGg(
542 op: Operator,
543 count: number,
544 ctx: OperatorContext,
545): void {
546 // count=1 means no count given, target = first line
547 // otherwise target = line N
548 const target =
549 count === 1 ? ctx.cursor.startOfFirstLine() : ctx.cursor.goToLine(count)
550
551 if (target.equals(ctx.cursor)) return
552
553 const range = getOperatorRange(ctx.cursor, target, 'gg', op, count)
554 applyOperator(op, range.from, range.to, ctx, range.linewise)
555 ctx.recordChange({ type: 'operator', op, motion: 'gg', count })
556}

Callers 1

fromOperatorGFunction · 0.85

Calls 5

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

Tested by

no test coverage detected