From f377c1cff8e0b74ed31c2f8a624c8c1b464f29b4 Mon Sep 17 00:00:00 2001 From: Marco Kurzynski Date: Wed, 9 Jul 2025 10:10:10 -0400 Subject: [PATCH] added a selected-register! function for the plugin system for use with register->value etc. (#41) --- helix-term/src/commands/engine/steel.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/helix-term/src/commands/engine/steel.rs b/helix-term/src/commands/engine/steel.rs index 8d7b61c15..a3902f3e5 100644 --- a/helix-term/src/commands/engine/steel.rs +++ b/helix-term/src/commands/engine/steel.rs @@ -1724,6 +1724,11 @@ Get the `Rect` associated with the currently focused buffer. ``` "# ); + register_0!( + "selected-register!", + |cx: &mut Context| cx.editor.selected_register.unwrap_or(cx.editor.config().default_yank_register), + r#"Get currently selected register"# + ); // Arity 1 module.register_fn("editor->doc-id", cx_get_document_id);