diff --git a/Cargo.lock b/Cargo.lock index 329a24c8a6b76..4d34e6e6bd0df 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -262,11 +262,11 @@ dependencies = [ [[package]] name = "crossterm" version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e64e6c0fbe2c17357405f7c758c1ef960fce08bdfb2c03d88d2a18d7e09c4b67" +source = "git+https://github.com/crossterm-rs/crossterm?rev=refs/pull/735/head#be8032343090498ecc9cbe544f44614d4a1eab87" dependencies = [ "bitflags", "crossterm_winapi", + "filedescriptor", "futures-core", "libc", "mio", @@ -446,6 +446,17 @@ dependencies = [ "log", ] +[[package]] +name = "filedescriptor" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7199d965852c3bac31f779ef99cbb4537f80e952e2d6aa0ffeb30cce00f4f46e" +dependencies = [ + "libc", + "thiserror", + "winapi", +] + [[package]] name = "filetime" version = "0.2.18" diff --git a/Cargo.toml b/Cargo.toml index ecf6848e04a17..3dfb3f5d7970c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,3 +25,7 @@ lto = "fat" codegen-units = 1 # strip = "debuginfo" # TODO: or strip = true opt-level = 3 + + +[patch.crates-io] +crossterm = { git = "https://github.com/crossterm-rs/crossterm", rev = "refs/pull/735/head" } diff --git a/helix-term/Cargo.toml b/helix-term/Cargo.toml index 895a08828a989..389d8d9c2cf61 100644 --- a/helix-term/Cargo.toml +++ b/helix-term/Cargo.toml @@ -41,7 +41,7 @@ which = "4.2" tokio = { version = "1", features = ["rt", "rt-multi-thread", "io-util", "io-std", "time", "process", "macros", "fs", "parking_lot"] } tui = { path = "../helix-tui", package = "helix-tui", default-features = false, features = ["crossterm"] } -crossterm = { version = "0.25", features = ["event-stream"] } +crossterm = { version = "0.25", features = ["event-stream", "use-dev-tty"] } signal-hook = "0.3" tokio-stream = "0.1" futures-util = { version = "0.3", features = ["std", "async-await"], default-features = false } diff --git a/helix-term/src/application.rs b/helix-term/src/application.rs index c0cbc24514837..b6d690519e55e 100644 --- a/helix-term/src/application.rs +++ b/helix-term/src/application.rs @@ -239,11 +239,6 @@ impl Application { } } else if stdin().is_tty() || cfg!(feature = "integration") { editor.new_file(Action::VerticalSplit); - } else if cfg!(target_os = "macos") { - // On Linux and Windows, we allow the output of a command to be piped into the new buffer. - // This doesn't currently work on macOS because of the following issue: - // https://github.com/crossterm-rs/crossterm/issues/500 - anyhow::bail!("Piping into helix-term is currently not supported on macOS"); } else { editor .new_file_from_stdin(Action::VerticalSplit)