(
state: { type: 'operatorG'; op: Operator; count: number },
input: string,
ctx: TransitionContext,
)
| 418 | } |
| 419 | |
| 420 | function fromOperatorG( |
| 421 | state: { type: 'operatorG'; op: Operator; count: number }, |
| 422 | input: string, |
| 423 | ctx: TransitionContext, |
| 424 | ): TransitionResult { |
| 425 | if (input === 'j' || input === 'k') { |
| 426 | return { |
| 427 | execute: () => |
| 428 | executeOperatorMotion(state.op, `g${input}`, state.count, ctx), |
| 429 | } |
| 430 | } |
| 431 | if (input === 'g') { |
| 432 | return { execute: () => executeOperatorGg(state.op, state.count, ctx) } |
| 433 | } |
| 434 | // Any other input cancels the operator |
| 435 | return { next: { type: 'idle' } } |
| 436 | } |
| 437 | |
| 438 | function fromReplace( |
| 439 | state: { type: 'replace'; count: number }, |
no test coverage detected