diff --git a/helix-view/src/clipboard.rs b/helix-view/src/clipboard.rs index 5e16461e0..1cf633487 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 fcc037ed1..3cd3c8626 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 for crossterm::style::Attribute { fn from(style: UnderlineStyle) -> Self { match style {