diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 4542848bbe..215f71722a 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -464,6 +464,7 @@ VIMSCRIPT • |chdir()| allows optionally specifying a scope argument. • |cmdcomplete_info()| gets current cmdline completion info. • |getcompletiontype()| gets command-line completion type for any string. +• |has()| gained two new system dependent feature flags, |android| and |termux|. • |prompt_getinput()| gets current user-input in prompt-buffer. • |wildtrigger()| triggers command-line expansion. • |v:vim_did_init| is set after sourcing |init.vim| but before |load-plugins|. diff --git a/runtime/doc/vimfn.txt b/runtime/doc/vimfn.txt index a6e3010b06..4f8a357de4 100644 --- a/runtime/doc/vimfn.txt +++ b/runtime/doc/vimfn.txt @@ -4689,6 +4689,7 @@ has({feature}) *has()* < *feature-list* List of supported pseudo-feature names: acl |ACL| support. + *android* Android system (not necessarily |termux|). bsd BSD system (not macOS, use "mac" for that). clipboard |clipboard| provider is available. fname_case Case in file names matters (for Darwin and MS-Windows @@ -4702,6 +4703,7 @@ has({feature}) *has()* python3 Legacy Vim |python3| interface. |has-python| pythonx Legacy Vim |python_x| interface. |has-pythonx| sun SunOS system. + *termux* Termux, an |android| terminal app and packaging environment. ttyin input is a terminal (tty). ttyout output is a terminal (tty). unix Unix system. diff --git a/runtime/lua/vim/_meta/vimfn.lua b/runtime/lua/vim/_meta/vimfn.lua index b8de72a367..d975163af8 100644 --- a/runtime/lua/vim/_meta/vimfn.lua +++ b/runtime/lua/vim/_meta/vimfn.lua @@ -4236,6 +4236,7 @@ function vim.fn.globpath(path, expr, nosuf, list, allinks) end --- < *feature-list* --- List of supported pseudo-feature names: --- acl |ACL| support. +--- *android* Android system (not necessarily |termux|). --- bsd BSD system (not macOS, use "mac" for that). --- clipboard |clipboard| provider is available. --- fname_case Case in file names matters (for Darwin and MS-Windows @@ -4249,6 +4250,7 @@ function vim.fn.globpath(path, expr, nosuf, list, allinks) end --- python3 Legacy Vim |python3| interface. |has-python| --- pythonx Legacy Vim |python_x| interface. |has-pythonx| --- sun SunOS system. +--- *termux* Termux, an |android| terminal app and packaging environment. --- ttyin input is a terminal (tty). --- ttyout output is a terminal (tty). --- unix Unix system. diff --git a/src/nvim/eval.lua b/src/nvim/eval.lua index 7b2182ebee..60afb158ab 100644 --- a/src/nvim/eval.lua +++ b/src/nvim/eval.lua @@ -5221,6 +5221,7 @@ M.funcs = { < *feature-list* List of supported pseudo-feature names: acl |ACL| support. + *android* Android system (not necessarily |termux|). bsd BSD system (not macOS, use "mac" for that). clipboard |clipboard| provider is available. fname_case Case in file names matters (for Darwin and MS-Windows @@ -5234,6 +5235,7 @@ M.funcs = { python3 Legacy Vim |python3| interface. |has-python| pythonx Legacy Vim |python_x| interface. |has-pythonx| sun SunOS system. + *termux* Termux, an |android| terminal app and packaging environment. ttyin input is a terminal (tty). ttyout output is a terminal (tty). unix Unix system. diff --git a/src/nvim/eval/funcs.c b/src/nvim/eval/funcs.c index 927d733a23..c2738d45ab 100644 --- a/src/nvim/eval/funcs.c +++ b/src/nvim/eval/funcs.c @@ -2654,6 +2654,9 @@ static void f_gettext(typval_T *argvars, typval_T *rettv, EvalFuncData fptr) static void f_has(typval_T *argvars, typval_T *rettv, EvalFuncData fptr) { static const char *const has_list[] = { +#ifdef __ANDROID__ + "android", +#endif #if defined(BSD) && !defined(__APPLE__) && !defined(__GNU__) "bsd", #endif @@ -2666,6 +2669,9 @@ static void f_has(typval_T *argvars, typval_T *rettv, EvalFuncData fptr) #ifdef SUN_SYSTEM "sun", #endif +#ifdef __TERMUX__ + "termux", +#endif #ifdef UNIX "unix", #endif