From 61422235578d7d537ff9a57d75bd89131c3a5f7d Mon Sep 17 00:00:00 2001 From: Stephan Seitz Date: Sat, 12 Dec 2020 10:30:15 +0100 Subject: Add fix for vim.fn.executable(vim.NIL) This might be a hard error in future: https://github.com/neovim/neovim/issues/13485 https://github.com/vim/vim/commit/7bb4e74c38642682cfdd0cb4052adfa5efdd7dd1 --- lua/nvim-treesitter/shell_command_selectors.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lua') diff --git a/lua/nvim-treesitter/shell_command_selectors.lua b/lua/nvim-treesitter/shell_command_selectors.lua index 17cbb78cb..7b4875135 100644 --- a/lua/nvim-treesitter/shell_command_selectors.lua +++ b/lua/nvim-treesitter/shell_command_selectors.lua @@ -50,7 +50,7 @@ function M.select_rm_file_cmd(file, info_msg) end function M.select_executable(executables) - return vim.tbl_filter(function(c) return fn.executable(c) == 1 end, executables)[1] + return vim.tbl_filter(function(c) return c ~= vim.NIL and fn.executable(c) == 1 end, executables)[1] end function M.select_compiler_args(repo) -- cgit v1.2.3-70-g09d2