Skip to content

Commit

Permalink
Properly prevent crossterm features being used when `feature = "ter…
Browse files Browse the repository at this point in the history
…m"` not enabled in `helix-view` (#12734)
  • Loading branch information
john-h-k authored Jan 30, 2025
1 parent d285a8a commit 6906164
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
7 changes: 4 additions & 3 deletions helix-view/src/clipboard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down
1 change: 1 addition & 0 deletions helix-view/src/graphics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 6906164

Please sign in to comment.