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
:term doesn't work on mac OS High Sierra #2162
Comments
When did it break? What is your 'shell' setting? and what happens when you use |
It works in macOS 10.12, it breaks in macOS 10.13 (tested with Terminal.app and iTerm2). The |
I can reproduce the issue on macOS 10.13 with Vim as old as v0.997 (I haven't tried older versions). No problems with macOS 10.12. |
I guess someone with a recent mac needs to debug this then. |
On 10.13, trying to open Could you try this patch? (but this is just workaround) --- a/src/pty.c
+++ b/src/pty.c
@@ -267,7 +267,7 @@ OpenPTY(char **ttyn)
}
#endif
-#if defined(HAVE_SVR4_PTYS) && !defined(PTY_DONE) && !defined(hpux) && !defined(MACOS_X)
+#if defined(HAVE_SVR4_PTYS) && !defined(PTY_DONE) && !defined(hpux)
/* NOTE: Even though HPUX can have /dev/ptmx, the code below doesn't work!
* Same for Mac OS X Leopard. */ |
shouldn't we perhaps also get an error, if openpty fails? |
Yup, the patch appears to fix it. |
sorry for my ignorance but how i can apply ur patch @ichizok do u know some site i can read about that? Or i have to fork the vim repository make the changes and compile again? |
I agree to @ichizok . Recently, I've been working on overhauling macOS part of the build system, and I came across a similar problem regarding But my solution is a bit conservative in comparison with his: diff --git a/src/pty.c b/src/pty.c
index 9b0361222..cc1c39a43 100644
--- a/src/pty.c
+++ b/src/pty.c
@@ -267,10 +267,11 @@ OpenPTY(char **ttyn)
}
#endif
-#if defined(HAVE_SVR4_PTYS) && !defined(PTY_DONE) && !defined(hpux) && !defined(MACOS_X)
+#if defined(HAVE_SVR4_PTYS) && !defined(PTY_DONE) && !defined(hpux) \
+ && !(defined(MACOS_X) && !defined(MAC_OS_X_VERSION_10_6))
/* NOTE: Even though HPUX can have /dev/ptmx, the code below doesn't work!
- * Same for Mac OS X Leopard. */
+ * Same for Mac OS X Leopard (10.5). */
#define PTY_DONE
int
OpenPTY(char **ttyn) This is because of the comment on Leopard (10.5), and that, when googling, I came across a question at SO in which a Tiger (10.4) user asked about |
Same issue. |
Problem: :terminal doesn't work on Mac High Sierra. Solution: Change #ifdef for OpenPTY(). (Ozaki Kiichi, Kazunobu Kuriyama, closes vim#2162)
You likely ran into the same problem I had on High Sierra with Emacs shell windows (https://stackoverflow.com/questions/53531777/cannot-open-pty-under-mac-os-high-sierra/53581958#53581958) -- High Sierra uses a different mechanism for allocating pty's than earlier Mac OS X releases, so if your code isn't reconfigured for it, it will fail to allocate a pty. |
When i run :term in vim only get a black window
the prompt never appear, im running vim 8.0.1150
The text was updated successfully, but these errors were encountered: