( op: Operator, count: number, ctx: OperatorContext, )
| 539 | } |
| 540 | |
| 541 | export 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 | } |
no test coverage detected