1
0
forked from aniani/vim

patch 8.0.0096

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.
This commit is contained in:
Bram Moolenaar
2016-11-24 15:09:07 +01:00
parent 182707ac10
commit 2cab0e1910
7 changed files with 25 additions and 5 deletions

View File

@@ -5959,6 +5959,10 @@ f_has(typval_T *argvars, typval_T *rettv)
}
else if (STRICMP(name, "vim_starting") == 0)
n = (starting != 0);
else if (STRICMP(name, "ttyin") == 0)
n = mch_input_isatty();
else if (STRICMP(name, "ttyout") == 0)
n = stdout_isatty;
#ifdef FEAT_MBYTE
else if (STRICMP(name, "multi_byte_encoding") == 0)
n = has_mbyte;