Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'helix-view/src/clipboard.rs')
-rw-r--r--helix-view/src/clipboard.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/helix-view/src/clipboard.rs b/helix-view/src/clipboard.rs
index 5e16461e..1cf63348 100644
--- a/helix-view/src/clipboard.rs
+++ b/helix-view/src/clipboard.rs
@@ -122,10 +122,11 @@ mod external {
Self::Tmux
} else if binary_exists("pbcopy") && binary_exists("pbpaste") {
Self::Pasteboard
- } else if cfg!(feature = "term") {
- Self::Termcode
} else {
- Self::None
+ #[cfg(feature = "term")]
+ return Self::Termcode;
+ #[cfg(not(feature = "term"))]
+ return Self::None;
}
}