From 3333070033e847a524dc5703c090673f7c11e36f Mon Sep 17 00:00:00 2001 From: Alvin Novian Date: Fri, 26 Apr 2024 13:35:14 +0700 Subject: [PATCH] use default clipboard provider for wezterm connect --- helix-view/src/clipboard.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/helix-view/src/clipboard.rs b/helix-view/src/clipboard.rs index 8dd7ebb16..12c604884 100644 --- a/helix-view/src/clipboard.rs +++ b/helix-view/src/clipboard.rs @@ -103,7 +103,12 @@ pub fn get_clipboard_provider() -> Box { // TODO: support for user-defined provider, probably when we have plugin support by setting a // variable? - if env_var_is_set("WAYLAND_DISPLAY") && binary_exists("wl-copy") && binary_exists("wl-paste") { + if env_var_is_set("WEZTERM_UNIX_SOCKET") && binary_exists("wezterm") { + Box::new(provider::FallbackProvider::new()) + } else if env_var_is_set("WAYLAND_DISPLAY") + && binary_exists("wl-copy") + && binary_exists("wl-paste") + { command_provider! { paste => "wl-paste", "--no-newline"; copy => "wl-copy", "--type", "text/plain";