( op: Operator, count: number, ctx: OperatorContext, )
| 522 | } |
| 523 | |
| 524 | export 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 | |
| 541 | export function executeOperatorGg( |
| 542 | op: Operator, |
no test coverage detected