MCPcopy Create free account
hub / github.com/claude-code-best/claude-code / handleYankPop

Function handleYankPop

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

Source from the content-addressed store, hash-verified

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