* Copy the current text selection to the system clipboard via OSC 52 * and clear the selection. Returns the copied text (empty if no selection).
()
| 1031 | * and clear the selection. Returns the copied text (empty if no selection). |
| 1032 | */ |
| 1033 | copySelection(): string { |
| 1034 | if (!hasSelection(this.selection)) return ''; |
| 1035 | const text = this.copySelectionNoClear(); |
| 1036 | clearSelection(this.selection); |
| 1037 | this.notifySelectionChange(); |
| 1038 | return text; |
| 1039 | } |
| 1040 | |
| 1041 | /** Clear the current text selection without copying. */ |
| 1042 | clearTextSelection(): void { |
no test coverage detected