( op: Operator, motion: string, count: number, ctx: OperatorContext, )
| 40 | * Execute an operator with a simple motion. |
| 41 | */ |
| 42 | export function executeOperatorMotion( |
| 43 | op: Operator, |
| 44 | motion: string, |
| 45 | count: number, |
| 46 | ctx: OperatorContext, |
| 47 | ): void { |
| 48 | const target = resolveMotion(motion, ctx.cursor, count) |
| 49 | if (target.equals(ctx.cursor)) return |
| 50 | |
| 51 | const range = getOperatorRange(ctx.cursor, target, motion, op, count) |
| 52 | applyOperator(op, range.from, range.to, ctx, range.linewise) |
| 53 | ctx.recordChange({ type: 'operator', op, motion, count }) |
| 54 | } |
| 55 | |
| 56 | /** |
| 57 | * Execute an operator with a find motion. |
no test coverage detected