diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-03-05 15:54:41 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-05 15:54:41 +0800 |
commit | 5b312cd5f67646005312d2ebb2ef0d1bc584dcff (patch) | |
tree | 0039826e1234701c6f500a1bcd2a1b366eec3c04 /src/nvim/eval/funcs.c | |
parent | 0ffc9264996573e2e8e4ad787c230ebda6fdf8ce (diff) | |
download | rneovim-5b312cd5f67646005312d2ebb2ef0d1bc584dcff.tar.gz rneovim-5b312cd5f67646005312d2ebb2ef0d1bc584dcff.tar.bz2 rneovim-5b312cd5f67646005312d2ebb2ef0d1bc584dcff.zip |
fix(eval): make has('pythonx') work properly (#27739)
Problem: has('pythonx') always returns 1.
Solution: Make it the same as has('python3').
Diffstat (limited to 'src/nvim/eval/funcs.c')
-rw-r--r-- | src/nvim/eval/funcs.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nvim/eval/funcs.c b/src/nvim/eval/funcs.c index fa57d41032..605170610c 100644 --- a/src/nvim/eval/funcs.c +++ b/src/nvim/eval/funcs.c @@ -3315,7 +3315,6 @@ static void f_has(typval_T *argvars, typval_T *rettv, EvalFuncData fptr) "path_extra", "persistent_undo", "profile", - "pythonx", "reltime", "quickfix", "rightleft", @@ -3406,6 +3405,8 @@ static void f_has(typval_T *argvars, typval_T *rettv, EvalFuncData fptr) n = syntax_present(curwin); } else if (STRICMP(name, "clipboard_working") == 0) { n = eval_has_provider("clipboard"); + } else if (STRICMP(name, "pythonx") == 0) { + n = eval_has_provider("python3"); } else if (STRICMP(name, "wsl") == 0) { n = has_wsl(); #ifdef UNIX |