added a selected-register! function for the plugin system for use with register->value etc. (#41)

pull/8675/merge^2
Marco Kurzynski 2025-07-09 10:10:10 -04:00 committed by GitHub
parent 46abe80bdd
commit f377c1cff8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 0 deletions

View File

@ -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);