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