From 860ecd705588470b52094b7036c016b2af15f8c9 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Mon, 23 Oct 2017 01:50:26 +0200 Subject: vim-patch:8.0.0096: has('ttyin'), has('ttyout') Nvim note: intentionally did not include `--ttyfail` since its purpose is not clear. (And it isn't used in any Vim test files/scripts). --- Problem: When the input or output is not a tty Vim appears to hang. Solution: Add the --ttyfail argument. Also add the "ttyin" and "ttyout" features to be able to check in Vim script. https://github.com/vim/vim/commit/2cab0e191055a8145ccd46cd52869fbb9798b971 --- src/nvim/main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/nvim/main.c') diff --git a/src/nvim/main.c b/src/nvim/main.c index ea7a58bda3..93afe11f3a 100644 --- a/src/nvim/main.c +++ b/src/nvim/main.c @@ -1240,8 +1240,10 @@ static void init_startuptime(mparm_T *paramp) static void check_and_set_isatty(mparm_T *paramp) { - paramp->input_isatty = os_isatty(fileno(stdin)); - paramp->output_isatty = os_isatty(fileno(stdout)); + stdin_isatty + = paramp->input_isatty = os_isatty(fileno(stdin)); + stdout_isatty + = paramp->output_isatty = os_isatty(fileno(stdout)); paramp->err_isatty = os_isatty(fileno(stderr)); TIME_MSG("window checked"); } -- cgit