-
-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Helix editor panics when started from xplr #449
Comments
Thanks for reporting. Reference line: https://github.com/crossterm-rs/crossterm/blob/9bc5cd3527a2d26caa6e2ccdc499beb4764fca95/src/event/read.rs#L38 |
The problem seems to be in macOS. But works fine on Linux (tested on the latest Manjaro). |
The deepest I could investigate was upto this function where helix tries to create a file descriptor pointing to the standard input or So I tried to run the following code from inside xplr terminal, hoping for it to panic: use libc;
use std::fs;
use std::os::unix::io::{IntoRawFd, RawFd};
fn main() {
unsafe { libc::isatty(libc::STDIN_FILENO) };
fs::OpenOptions::new().read(true).write(true).open("/dev/tty").unwrap().into_raw_fd();
} But it ran successfully. |
Got some helpful references from the crossterm discord channel: |
Oh, it looks like crossterm-rs/crossterm#500 is the same issue as what prevented Helix's "pipe into a buffer on startup" feature from working on MacOS. |
I updated to the latest versions of Helix and xplr, but I'm still getting the same exact error. |
Can you confirm the correct binary is run in the xplr shell? Spawn the shell using :! and check version "$EDITOR --version" |
It's Helix |
Was there any solution to this in the end? • MacOS 11.7 Having the same problem |
Ah, so it's macOS specific. I currently don't have access to a macOS, but it sounds like the issue is related to one of the crossterm issues linked above. Need help to confirm this by a macOS user. |
I’ve been able to start Helix from xplr on macOS using @yyogo’s patch. |
Works perfectly. Thanks |
Hope it gets fixed in crossterm/helix soon. Closing this. |
368064e3
When I try to start Helix from xplr, either via
:e
or even by typinghx
into the shell opened by:!
, it panics with the following panic message from crossterm:The panic message also gives that it occurred at
src/event/read.rs:38:30
in crossterm.The text was updated successfully, but these errors were encountered: