MCPcopy
hub / github.com/codeaashu/claude-code / yankPop

Function yankPop

src/utils/Cursor.ts:91–103  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

89}
90
91export function yankPop(): {
92 text: string
93 start: number
94 length: number
95} | null {
96 if (!lastActionWasYank || killRing.length <= 1) {
97 return null
98 }
99 // Cycle to next item in kill ring
100 killRingIndex = (killRingIndex + 1) % killRing.length
101 const text = killRing[killRingIndex] ?? ''
102 return { text, start: lastYankStart, length: lastYankLength }
103}
104
105export function updateYankLength(length: number): void {
106 lastYankLength = length

Callers 2

handleKeyDownFunction · 0.85
handleYankPopFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected