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

Function getOperatorRangeForFind

src/vim/operators.ts:482–491  ·  view source on GitHub ↗

* Get the range for a find-based operator. * Note: _findType is unused because Cursor.findCharacter already adjusts * the offset for t/T motions. All find types are treated as inclusive here.

(
  cursor: Cursor,
  target: Cursor,
  _findType: FindType,
)

Source from the content-addressed store, hash-verified

480 * the offset for t/T motions. All find types are treated as inclusive here.
481 */
482function getOperatorRangeForFind(
483 cursor: Cursor,
484 target: Cursor,
485 _findType: FindType,
486): { from: number; to: number } {
487 const from = Math.min(cursor.offset, target.offset)
488 const maxOffset = Math.max(cursor.offset, target.offset)
489 const to = cursor.measuredText.nextOffset(maxOffset)
490 return { from, to }
491}
492
493function applyOperator(
494 op: Operator,

Callers 1

executeOperatorFindFunction · 0.85

Calls 2

maxMethod · 0.80
nextOffsetMethod · 0.80

Tested by

no test coverage detected