MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / executeOperatorFind

Function executeOperatorFind

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

Source from the content-addressed store, hash-verified

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