mirror of
https://github.com/alacritty/alacritty.git
synced 2024-11-11 13:51:01 -05:00
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.
This commit is contained in:
parent
0d060d5d80
commit
dd756c27fc
1 changed files with 2 additions and 6 deletions
|
@ -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(())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue