Skip to content

Commit b313f09

Browse files
committed
WIP: use crossterm version with /dev/tty support on macos
1 parent 77860bd commit b313f09

File tree

4 files changed

+18
-8
lines changed

4 files changed

+18
-8
lines changed

Cargo.lock

Lines changed: 13 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,7 @@ lto = "fat"
2525
codegen-units = 1
2626
# strip = "debuginfo" # TODO: or strip = true
2727
opt-level = 3
28+
29+
30+
[patch.crates-io]
31+
crossterm = { git = "https://github.com/crossterm-rs/crossterm", rev = "refs/pull/735/head" }

helix-term/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ which = "4.2"
4141

4242
tokio = { version = "1", features = ["rt", "rt-multi-thread", "io-util", "io-std", "time", "process", "macros", "fs", "parking_lot"] }
4343
tui = { path = "../helix-tui", package = "helix-tui", default-features = false, features = ["crossterm"] }
44-
crossterm = { version = "0.25", features = ["event-stream"] }
44+
crossterm = { version = "0.25", features = ["event-stream", "use-dev-tty"] }
4545
signal-hook = "0.3"
4646
tokio-stream = "0.1"
4747
futures-util = { version = "0.3", features = ["std", "async-await"], default-features = false }

helix-term/src/application.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -239,11 +239,6 @@ impl Application {
239239
}
240240
} else if stdin().is_tty() || cfg!(feature = "integration") {
241241
editor.new_file(Action::VerticalSplit);
242-
} else if cfg!(target_os = "macos") {
243-
// On Linux and Windows, we allow the output of a command to be piped into the new buffer.
244-
// This doesn't currently work on macOS because of the following issue:
245-
// https://github.com/crossterm-rs/crossterm/issues/500
246-
anyhow::bail!("Piping into helix-term is currently not supported on macOS");
247242
} else {
248243
editor
249244
.new_file_from_stdin(Action::VerticalSplit)

0 commit comments

Comments
 (0)