( op: Operator, scope: TextObjScope, objType: string, count: number, ctx: OperatorContext, )
| 78 | * Execute an operator with a text object. |
| 79 | */ |
| 80 | export function executeOperatorTextObj( |
| 81 | op: Operator, |
| 82 | scope: TextObjScope, |
| 83 | objType: string, |
| 84 | count: number, |
| 85 | ctx: OperatorContext, |
| 86 | ): void { |
| 87 | const range = findTextObject( |
| 88 | ctx.text, |
| 89 | ctx.cursor.offset, |
| 90 | objType, |
| 91 | scope === 'inner', |
| 92 | ) |
| 93 | if (!range) return |
| 94 | |
| 95 | applyOperator(op, range.start, range.end, ctx) |
| 96 | ctx.recordChange({ type: 'operatorTextObj', op, objType, scope, count }) |
| 97 | } |
| 98 | |
| 99 | /** |
| 100 | * Execute a line operation (dd, cc, yy). |
no test coverage detected