* Copy the current selection to the clipboard without clearing the * highlight. Matches iTerm2's copy-on-select behavior where the selected * region stays visible after the automatic copy.
()
| 1014 | * region stays visible after the automatic copy. |
| 1015 | */ |
| 1016 | copySelectionNoClear(): string { |
| 1017 | if (!hasSelection(this.selection)) return ''; |
| 1018 | const text = getSelectedText(this.selection, this.frontFrame.screen); |
| 1019 | if (text) { |
| 1020 | // Raw OSC 52, or DCS-passthrough-wrapped OSC 52 inside tmux (tmux |
| 1021 | // drops it silently unless allow-passthrough is on — no regression). |
| 1022 | void setClipboard(text).then(raw => { |
| 1023 | if (raw) this.options.stdout.write(raw); |
| 1024 | }); |
| 1025 | } |
| 1026 | return text; |
| 1027 | } |
| 1028 | |
| 1029 | /** |
| 1030 | * Copy the current text selection to the system clipboard via OSC 52 |
no test coverage detected