aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2017-10-23 01:50:26 +0200
committerJustin M. Keyes <justinkz@gmail.com>2017-11-04 09:36:52 +0100
commit860ecd705588470b52094b7036c016b2af15f8c9 (patch)
tree7c3f9d737c1b2f997f0a4636a76c6fc1cc74a46f /src/nvim/eval.c
parenta39c8b7ce30ddeed4329c28c42b1b699103dccab (diff)
downloadrneovim-860ecd705588470b52094b7036c016b2af15f8c9.tar.gz
rneovim-860ecd705588470b52094b7036c016b2af15f8c9.tar.bz2
rneovim-860ecd705588470b52094b7036c016b2af15f8c9.zip
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
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r--src/nvim/eval.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c
index c7cb51ac29..9752851d4e 100644
--- a/src/nvim/eval.c
+++ b/src/nvim/eval.c
@@ -10672,6 +10672,10 @@ static void f_has(typval_T *argvars, typval_T *rettv, FunPtr fptr)
n = has_nvim_version(name + 5);
} else if (STRICMP(name, "vim_starting") == 0) {
n = (starting != 0);
+ } else if (STRICMP(name, "ttyin") == 0) {
+ n = stdin_isatty;
+ } else if (STRICMP(name, "ttyout") == 0) {
+ n = stdout_isatty;
} else if (STRICMP(name, "multi_byte_encoding") == 0) {
n = has_mbyte != 0;
#if defined(USE_ICONV) && defined(DYNAMIC_ICONV)