diff options
author | Christian Duerr <chrisduerr@users.noreply.github.com> | 2019-04-21 00:52:06 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-21 00:52:06 +0000 |
commit | dd756c27fc51fd2be1af893b41b10b618ffa83ce (patch) | |
tree | 72c1e118a12bdc63cb8040abb33e5e2af5ad58c0 | |
parent | 0d060d5d801e3abb55035269138d819d38fc175b (diff) | |
download | alacritty-dd756c27fc51fd2be1af893b41b10b618ffa83ce.tar.gz alacritty-dd756c27fc51fd2be1af893b41b10b618ffa83ce.zip |
Fix selection copying on Windows
The `copypasta` crate incorrectly mapped the secondary clipboard on
Windows to the primary clipboard, leading to the primary clipboard
getting overwritten whenever the selection clipboard was updated.
The new Windows clipboard mimics the macOS clipboard, which also does
not have a selection clipboard.
This fixes #2050.
-rw-r--r-- | copypasta/src/windows.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/copypasta/src/windows.rs b/copypasta/src/windows.rs index 48b033cc..3bff6e59 100644 --- a/copypasta/src/windows.rs +++ b/copypasta/src/windows.rs @@ -40,11 +40,6 @@ impl Load for Clipboard { let mut ctx: ClipboardContext = ClipboardProvider::new().unwrap(); ctx.get_contents().map_err(Error::Clipboard) } - - fn load_selection(&self) -> Result<String, Self::Err> { - let mut ctx: ClipboardContext = ClipboardProvider::new().unwrap(); - ctx.get_contents().map_err(Error::Clipboard) - } } impl Store for Clipboard { @@ -63,6 +58,7 @@ impl Store for Clipboard { where S: Into<String>, { - self.0.set_contents(contents.into()).map_err(Error::Clipboard) + // No such thing on Windows + Ok(()) } } |