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

Function handleYankPop

src/hooks/useTextInput.ts:209–222  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

207 }
208
209 function handleYankPop(): Cursor {
210 const popResult = yankPop()
211 if (!popResult) {
212 return cursor
213 }
214 const { text, start, length } = popResult
215 // Replace the previously yanked text with the new one
216 const before = cursor.text.slice(0, start)
217 const after = cursor.text.slice(start + length)
218 const newText = before + text + after
219 const newOffset = start + text.length
220 updateYankLength(text.length)
221 return Cursor.fromText(newText, columns, newOffset)
222 }
223
224 const handleCtrl = mapInput([
225 ['a', () => cursor.startOfLine()],

Callers

nothing calls this directly

Calls 3

yankPopFunction · 0.85
updateYankLengthFunction · 0.85
fromTextMethod · 0.80

Tested by

no test coverage detected