aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/provider/health.lua
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2023-04-14 10:39:57 +0200
committerGitHub <noreply@github.com>2023-04-14 10:39:57 +0200
commit4d04feb6629cb049cb2a13ba35f0c8d3c6b67ff4 (patch)
tree17dadca32fa46116a9c576fc651a61bc5da8ece4 /runtime/lua/provider/health.lua
parent72a327cad20fa2dbb214177cc48c533543d5b9e8 (diff)
downloadrneovim-4d04feb6629cb049cb2a13ba35f0c8d3c6b67ff4.tar.gz
rneovim-4d04feb6629cb049cb2a13ba35f0c8d3c6b67ff4.tar.bz2
rneovim-4d04feb6629cb049cb2a13ba35f0c8d3c6b67ff4.zip
feat(lua): vim.tbl_contains supports general tables and predicates (#23040)
* feat(lua): vim.tbl_contains supports general tables and predicates Problem: `vim.tbl_contains` only works for list-like tables (integer keys without gaps) and primitive values (in particular, not for nested tables). Solution: Rename `vim.tbl_contains` to `vim.list_contains` and add new `vim.tbl_contains` that works for general tables and optionally allows `value` to be a predicate function that is checked for every key.
Diffstat (limited to 'runtime/lua/provider/health.lua')
-rw-r--r--runtime/lua/provider/health.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/lua/provider/health.lua b/runtime/lua/provider/health.lua
index 8ebc8ccb17..a5fe14732c 100644
--- a/runtime/lua/provider/health.lua
+++ b/runtime/lua/provider/health.lua
@@ -449,7 +449,7 @@ local function python()
local path_bin = vim.fs.normalize(path .. '/' .. pyname)
if
path_bin ~= vim.fs.normalize(python_exe)
- and vim.tbl_contains(python_multiple, path_bin)
+ and vim.list_contains(python_multiple, path_bin)
and executable(path_bin)
then
python_multiple[#python_multiple + 1] = path_bin