aboutsummaryrefslogtreecommitdiffstats
path: root/default-plugins/status-bar/src
diff options
context:
space:
mode:
authorAram Drevekenin <aram@poor.dev>2025-02-20 17:14:43 +0100
committerGitHub <noreply@github.com>2025-02-20 17:14:43 +0100
commitf0680fdeb93dd6934cfd52e175428e0cde36fadd (patch)
tree1efb28202afe106acae03871216b8a21c06860ce /default-plugins/status-bar/src
parentdocs(changelog): filepicker improvements (diff)
downloadsl0ppij-f0680fdeb93dd6934cfd52e175428e0cde36fadd.tar.gz
sl0ppij-f0680fdeb93dd6934cfd52e175428e0cde36fadd.tar.xz
sl0ppij-f0680fdeb93dd6934cfd52e175428e0cde36fadd.zip
fix(clipboard): clipboard message (#4009)
* fix clipboard message * fix clipboard message gitter * style(fmt): rustfmt
Diffstat (limited to 'default-plugins/status-bar/src')
-rw-r--r--default-plugins/status-bar/src/main.rs2
-rw-r--r--default-plugins/status-bar/src/one_line_ui.rs2
-rw-r--r--default-plugins/status-bar/src/second_line.rs5
3 files changed, 4 insertions, 5 deletions
diff --git a/default-plugins/status-bar/src/main.rs b/default-plugins/status-bar/src/main.rs
index db2b7c6b..65b73819 100644
--- a/default-plugins/status-bar/src/main.rs
+++ b/default-plugins/status-bar/src/main.rs
@@ -329,7 +329,7 @@ impl State {
let active_tab = self.tabs.iter().find(|t| t.active);
if let Some(copy_destination) = self.text_copy_destination {
- text_copied_hint(&self.mode_info.style.colors, copy_destination)
+ text_copied_hint(copy_destination)
} else if self.display_system_clipboard_failure {
system_clipboard_error(&self.mode_info.style.colors)
} else if let Some(active_tab) = active_tab {
diff --git a/default-plugins/status-bar/src/one_line_ui.rs b/default-plugins/status-bar/src/one_line_ui.rs
index b230a25b..4526e6f8 100644
--- a/default-plugins/status-bar/src/one_line_ui.rs
+++ b/default-plugins/status-bar/src/one_line_ui.rs
@@ -24,7 +24,7 @@ pub fn one_line_ui(
clipboard_failure: bool,
) -> LinePart {
if let Some(text_copied_to_clipboard_destination) = text_copied_to_clipboard_destination {
- return text_copied_hint(&help.style.colors, text_copied_to_clipboard_destination);
+ return text_copied_hint(text_copied_to_clipboard_destination);
}
if clipboard_failure {
return system_clipboard_error(&help.style.colors);
diff --git a/default-plugins/status-bar/src/second_line.rs b/default-plugins/status-bar/src/second_line.rs
index 0c13ad14..fbc02b51 100644
--- a/default-plugins/status-bar/src/second_line.rs
+++ b/default-plugins/status-bar/src/second_line.rs
@@ -348,8 +348,7 @@ pub fn keybinds(help: &ModeInfo, tip_name: &str, max_width: usize) -> LinePart {
best_effort_shortcut_list(help, tip_body.short, max_width)
}
-pub fn text_copied_hint(palette: &Styling, copy_destination: CopyDestination) -> LinePart {
- let green_color = palette_match!(palette.text_unselected.emphasis_2);
+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"))]
@@ -359,7 +358,7 @@ pub fn text_copied_hint(palette: &Styling, copy_destination: CopyDestination) ->
CopyDestination::System => "Text copied to system clipboard",
};
LinePart {
- part: Style::new().fg(green_color).bold().paint(hint).to_string(),
+ part: serialize_text(&Text::new(&hint).color_range(2, ..).opaque()),
len: hint.len(),
}
}