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

Function getOperatorRangeForFind

source code/vim/operators.ts:484–493  ·  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

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

Callers 1

executeOperatorFindFunction · 0.85

Calls 2

maxMethod · 0.80
nextOffsetMethod · 0.80

Tested by

no test coverage detected