Mercurial > forks > helix
changeset 6492:29855a2e3694
Properly prevent `crossterm` features being used when `feature = "term"` not enabled in `helix-view` (#12734)
author | John Kelly <johnharrykelly@gmail.com> |
---|---|
date | Thu, 30 Jan 2025 23:38:07 +0000 |
parents | ca8586ad7cec |
children | f26389f37324 |
files | helix-view/src/clipboard.rs helix-view/src/graphics.rs |
diffstat | 2 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/helix-view/src/clipboard.rs Thu Jan 30 11:54:36 2025 -0500 +++ b/helix-view/src/clipboard.rs Thu Jan 30 23:38:07 2025 +0000 @@ -122,10 +122,11 @@ 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; } }