MCPcopy Index your code
hub / github.com/codeaashu/claude-code / executeOperatorFind

Function executeOperatorFind

src/vim/operators.ts:59–75  ·  view source on GitHub ↗
(
  op: Operator,
  findType: FindType,
  char: string,
  count: number,
  ctx: OperatorContext,
)

Source from the content-addressed store, hash-verified

57 * Execute an operator with a find motion.
58 */
59export function executeOperatorFind(
60 op: Operator,
61 findType: FindType,
62 char: string,
63 count: number,
64 ctx: OperatorContext,
65): void {
66 const targetOffset = ctx.cursor.findCharacter(char, findType, count)
67 if (targetOffset === null) return
68
69 const target = new Cursor(ctx.cursor.measuredText, targetOffset)
70 const range = getOperatorRangeForFind(ctx.cursor, target, findType)
71
72 applyOperator(op, range.from, range.to, ctx)
73 ctx.setLastFind(findType, char)
74 ctx.recordChange({ type: 'operatorFind', op, find: findType, char, count })
75}
76
77/**
78 * Execute an operator with a text object.

Callers 2

fromOperatorFindFunction · 0.85
replayLastChangeFunction · 0.85

Calls 3

getOperatorRangeForFindFunction · 0.85
applyOperatorFunction · 0.85
findCharacterMethod · 0.80

Tested by

no test coverage detected