mirror of https://github.com/helix-editor/helix
Properly prevent `crossterm` features being used when `feature = "term"` not enabled in `helix-view` (#12734)
parent
d285a8a9e5
commit
6906164177
|
@ -122,10 +122,11 @@ mod external {
|
||||||
Self::Tmux
|
Self::Tmux
|
||||||
} else if binary_exists("pbcopy") && binary_exists("pbpaste") {
|
} else if binary_exists("pbcopy") && binary_exists("pbpaste") {
|
||||||
Self::Pasteboard
|
Self::Pasteboard
|
||||||
} else if cfg!(feature = "term") {
|
|
||||||
Self::Termcode
|
|
||||||
} else {
|
} else {
|
||||||
Self::None
|
#[cfg(feature = "term")]
|
||||||
|
return Self::Termcode;
|
||||||
|
#[cfg(not(feature = "term"))]
|
||||||
|
return Self::None;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -342,6 +342,7 @@ impl FromStr for UnderlineStyle {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "term")]
|
||||||
impl From<UnderlineStyle> for crossterm::style::Attribute {
|
impl From<UnderlineStyle> for crossterm::style::Attribute {
|
||||||
fn from(style: UnderlineStyle) -> Self {
|
fn from(style: UnderlineStyle) -> Self {
|
||||||
match style {
|
match style {
|
||||||
|
|
Loading…
Reference in New Issue