()
| 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()], |
nothing calls this directly
no test coverage detected