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.

2cab0e1910
This commit is contained in:
Justin M. Keyes
2017-10-23 01:50:26 +02:00
parent a39c8b7ce3
commit 860ecd7055
4 changed files with 24 additions and 15 deletions

View File

@@ -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");
}