Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'helix-term/src/ui/editor.rs')
-rw-r--r--helix-term/src/ui/editor.rs21
1 files changed, 16 insertions, 5 deletions
diff --git a/helix-term/src/ui/editor.rs b/helix-term/src/ui/editor.rs
index b25af107..9ffc3e87 100644
--- a/helix-term/src/ui/editor.rs
+++ b/helix-term/src/ui/editor.rs
@@ -1272,8 +1272,10 @@ impl EditorView {
};
if should_yank {
- commands::MappableCommand::yank_main_selection_to_primary_clipboard
- .execute(cxt);
+ commands::yank_main_selection_to_register(
+ cxt.editor,
+ config.mouse_yank_register,
+ );
EventResult::Consumed(None)
} else {
EventResult::Ignored(None)
@@ -1313,8 +1315,11 @@ impl EditorView {
}
if modifiers == KeyModifiers::ALT {
- commands::MappableCommand::replace_selections_with_primary_clipboard
- .execute(cxt);
+ commands::replace_selections_with_register(
+ cxt.editor,
+ config.mouse_yank_register,
+ cxt.count(),
+ );
return EventResult::Consumed(None);
}
@@ -1323,7 +1328,13 @@ impl EditorView {
let doc = doc_mut!(editor, &view!(editor, view_id).doc);
doc.set_selection(view_id, Selection::point(pos));
cxt.editor.focus(view_id);
- commands::MappableCommand::paste_primary_clipboard_before.execute(cxt);
+
+ commands::paste(
+ cxt.editor,
+ config.mouse_yank_register,
+ commands::Paste::Before,
+ cxt.count(),
+ );
return EventResult::Consumed(None);
}