mirror of
https://github.com/zellij-org/zellij.git
synced 2026-10-11 22:50:07 +00:00
* shared instance plugins * reduce needless allocations and share memory * fix: read buffer bug * idle plugin fixes and optimizations * trim allocator for glibc on pane close * fix flaky integration tests * refactor: naming * rustfmt * add pr
28 lines
951 B
Rust
28 lines
951 B
Rust
use crate::compact_bar::LinePart;
|
|
use zellij_tile::prelude::*;
|
|
|
|
pub fn text_copied_hint(copy_destination: CopyDestination) -> LinePart {
|
|
let hint = match copy_destination {
|
|
CopyDestination::Command => "Text piped to external command",
|
|
#[cfg(not(target_os = "macos"))]
|
|
CopyDestination::Primary => "Text copied to system primary selection",
|
|
#[cfg(target_os = "macos")]
|
|
CopyDestination::Primary => "Text copied to system clipboard",
|
|
CopyDestination::System => "Text copied to system clipboard",
|
|
};
|
|
LinePart {
|
|
part: serialize_text(&Text::new(&hint).color_range(2, ..).opaque()),
|
|
len: hint.len(),
|
|
tab_index: None,
|
|
}
|
|
}
|
|
|
|
pub fn system_clipboard_error() -> LinePart {
|
|
let hint = " Error using the system clipboard.";
|
|
LinePart {
|
|
part: serialize_text(&Text::new(&hint).color_range(2, ..).opaque()),
|
|
len: hint.len(),
|
|
tab_index: None,
|
|
}
|
|
}
|