Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopySelection ¶ added in v0.132.0
CopySelection copies text that the user selected with the mouse. It does what CopyToClipboard does and, on X11 and Wayland, also sets the primary selection, so a middle click pastes the text as it does after a selection in the terminal itself.
func CopyToClipboard ¶
CopyToClipboard writes text to both the system clipboard and via OSC 52. Returns a tea.Cmd that can be used in Bubble Tea's Update flow. When the system clipboard cannot be written, the command yields a NativeCopyFailedMsg, except where no system clipboard exists (see hasSystemClipboard).
Types ¶
type NativeCopyFailedMsg ¶ added in v0.132.0
type NativeCopyFailedMsg struct {
Err error
}
NativeCopyFailedMsg reports that the system clipboard could not be written, for example because no clipboard tool is installed. The text still went to the terminal as an OSC 52 sequence, which only some terminals support.