MCPcopy Index your code
hub / github.com/claude-code-best/claude-code / executeRepeatFind

Function executeRepeatFind

src/vim/transitions.ts:465–490  ·  view source on GitHub ↗
(
  reverse: boolean,
  count: number,
  ctx: TransitionContext,
)

Source from the content-addressed store, hash-verified

463// ============================================================================
464
465function executeRepeatFind(
466 reverse: boolean,
467 count: number,
468 ctx: TransitionContext,
469): void {
470 const lastFind = ctx.getLastFind()
471 if (!lastFind) return
472
473 // Determine the effective find type based on reverse
474 let findType = lastFind.type
475 if (reverse) {
476 // Flip the direction
477 const flipMap: Record<FindType, FindType> = {
478 f: 'F',
479 F: 'f',
480 t: 'T',
481 T: 't',
482 }
483 findType = flipMap[findType]
484 }
485
486 const result = ctx.cursor.findCharacter(lastFind.char, findType, count)
487 if (result !== null) {
488 ctx.setOffset(result)
489 }
490}

Callers 1

handleNormalInputFunction · 0.85

Calls 1

findCharacterMethod · 0.80

Tested by

no test coverage detected