()
| 307 | } |
| 308 | |
| 309 | private yank(): void { |
| 310 | const text = this.killRing.peek(); |
| 311 | if (!text) return; |
| 312 | |
| 313 | this.pushUndo(); |
| 314 | |
| 315 | this.value = this.value.slice(0, this.cursor) + text + this.value.slice(this.cursor); |
| 316 | this.cursor += text.length; |
| 317 | this.lastAction = "yank"; |
| 318 | } |
| 319 | |
| 320 | private yankPop(): void { |
| 321 | if (this.lastAction !== "yank" || this.killRing.length <= 1) return; |
no test coverage detected