aboutsummaryrefslogtreecommitdiff
path: root/helix-view/src/register.rs
diff options
context:
space:
mode:
authorMichael Davis2023-07-11 15:23:49 +0000
committerBlaž Hrastnik2023-07-31 06:05:38 +0000
commit4555a6b4332b48384d4bccfef527d26060c34037 (patch)
treebaab80c83c6e4abe9bf9035794045d6ba575bb1f /helix-view/src/register.rs
parent2d838d729cca26a718e3536e8d75c60396420dbd (diff)
Reimplement clipboard commands in terms of special regs
Since the clipboard provider now lives on the Registers type, we want to eliminate it from the Editor. We can do that and clean up the commands that interact with the clipboard by calling regular yank, paste and replace impls on the clipboard special registers. Eventually the clipboard commands could be removed once macro keybinding is supported.
Diffstat (limited to 'helix-view/src/register.rs')
-rw-r--r--helix-view/src/register.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/helix-view/src/register.rs b/helix-view/src/register.rs
index 61912378..3d1849a6 100644
--- a/helix-view/src/register.rs
+++ b/helix-view/src/register.rs
@@ -215,6 +215,10 @@ impl Registers {
)
}
}
+
+ pub fn clipboard_provider_name(&self) -> Cow<str> {
+ self.clipboard_provider.name()
+ }
}
fn read_from_clipboard<'a>(