aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOmnikar2023-11-03 00:51:10 +0000
committerGitHub2023-11-03 00:51:10 +0000
commit1755c61d08b0a6f332eb8feee2e8d28bde162357 (patch)
tree73428abc9822c143e800336d55d294fbb8850242
parenta069b928973aad99b85dffb9d5ade7dae4b58c43 (diff)
Swap system and primary clipboard registers (#8703)
-rw-r--r--helix-view/src/register.rs20
1 files changed, 10 insertions, 10 deletions
diff --git a/helix-view/src/register.rs b/helix-view/src/register.rs
index 0ebea536..5592c6af 100644
--- a/helix-view/src/register.rs
+++ b/helix-view/src/register.rs
@@ -75,8 +75,8 @@ impl Registers {
self.clipboard_provider.as_ref(),
self.inner.get(&name),
match name {
- '*' => ClipboardType::Clipboard,
- '+' => ClipboardType::Selection,
+ '+' => ClipboardType::Clipboard,
+ '*' => ClipboardType::Selection,
_ => unreachable!(),
},
)),
@@ -95,8 +95,8 @@ impl Registers {
self.clipboard_provider.set_contents(
values.join(NATIVE_LINE_ENDING.as_str()),
match name {
- '*' => ClipboardType::Clipboard,
- '+' => ClipboardType::Selection,
+ '+' => ClipboardType::Clipboard,
+ '*' => ClipboardType::Selection,
_ => unreachable!(),
},
)?;
@@ -118,8 +118,8 @@ impl Registers {
'#' | '.' | '%' => Err(anyhow::anyhow!("Register {name} does not support pushing")),
'*' | '+' => {
let clipboard_type = match name {
- '*' => ClipboardType::Clipboard,
- '+' => ClipboardType::Selection,
+ '+' => ClipboardType::Clipboard,
+ '*' => ClipboardType::Selection,
_ => unreachable!(),
};
let contents = self.clipboard_provider.get_contents(clipboard_type)?;
@@ -172,8 +172,8 @@ impl Registers {
('#', "<selection indices>"),
('.', "<selection contents>"),
('%', "<document path>"),
- ('*', "<system clipboard>"),
- ('+', "<primary clipboard>"),
+ ('+', "<system clipboard>"),
+ ('*', "<primary clipboard>"),
]
.iter()
.copied(),
@@ -190,8 +190,8 @@ impl Registers {
match name {
'*' | '+' => {
self.clear_clipboard(match name {
- '*' => ClipboardType::Clipboard,
- '+' => ClipboardType::Selection,
+ '+' => ClipboardType::Clipboard,
+ '*' => ClipboardType::Selection,
_ => unreachable!(),
});
self.inner.remove(&name);