Unnamed repository; edit this file 'description' to name the repository.
-rw-r--r--helix-view/src/clipboard.rs7
-rw-r--r--helix-view/src/graphics.rs1
2 files changed, 5 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;
}
}
diff --git a/helix-view/src/graphics.rs b/helix-view/src/graphics.rs
index fcc037ed..3cd3c862 100644
--- a/helix-view/src/graphics.rs
+++ b/helix-view/src/graphics.rs
@@ -342,6 +342,7 @@ impl FromStr for UnderlineStyle {
}
}
+#[cfg(feature = "term")]
impl From<UnderlineStyle> for crossterm::style::Attribute {
fn from(style: UnderlineStyle) -> Self {
match style {