aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/commands.rs
diff options
context:
space:
mode:
Diffstat (limited to 'helix-term/src/commands.rs')
-rw-r--r--helix-term/src/commands.rs15
1 files changed, 13 insertions, 2 deletions
diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs
index 93e82b84..d5fc1ad9 100644
--- a/helix-term/src/commands.rs
+++ b/helix-term/src/commands.rs
@@ -3345,9 +3345,15 @@ fn yank_joined_to_clipboard_impl(
.map(Cow::into_owned)
.collect();
+ let clipboard_text = match clipboard_type {
+ ClipboardType::Clipboard => "system clipboard",
+ ClipboardType::Selection => "primary clipboard",
+ };
+
let msg = format!(
- "joined and yanked {} selection(s) to system clipboard",
+ "joined and yanked {} selection(s) to {}",
values.len(),
+ clipboard_text,
);
let joined = values.join(separator);
@@ -3376,6 +3382,11 @@ fn yank_main_selection_to_clipboard_impl(
let (view, doc) = current!(editor);
let text = doc.text().slice(..);
+ let message_text = match clipboard_type {
+ ClipboardType::Clipboard => "yanked main selection to system clipboard",
+ ClipboardType::Selection => "yanked main selection to primary clipboard",
+ };
+
let value = doc.selection(view.id).primary().fragment(text);
if let Err(e) = editor
@@ -3385,7 +3396,7 @@ fn yank_main_selection_to_clipboard_impl(
bail!("Couldn't set system clipboard content: {}", e);
}
- editor.set_status("yanked main selection to system clipboard");
+ editor.set_status(message_text);
Ok(())
}