Skip to content

Commit

Permalink
Reintroduce win32yank as a clipboard provider on Linux for WSL2 + Win…
Browse files Browse the repository at this point in the history
…dows 10 (#1912)

* feat(clipboard): reintroduce win32yank for wsl2 linux

* refactor(clipboard): adjust win32yank position to not interrupt wayland/x11

Co-authored-by: jiqb <[email protected]>
  • Loading branch information
LGUG2Z and jiqb committed Apr 1, 2022
1 parent 6bb2298 commit a963565
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions helix-view/src/clipboard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,11 @@ pub fn get_clipboard_provider() -> Box<dyn ClipboardProvider> {
primary_paste => "xsel", "-o";
primary_copy => "xsel", "-i";
}
} else if exists("win32yank.exe") {
command_provider! {
paste => "win32yank.exe", "-o", "--lf";
copy => "win32yank.exe", "-i", "--crlf";
}
} else if exists("termux-clipboard-set") && exists("termux-clipboard-get") {
command_provider! {
paste => "termux-clipboard-get";
Expand Down

0 comments on commit a963565

Please sign in to comment.