From a6363df6c4d92cf9666e9ffea270513d62a92b66 Mon Sep 17 00:00:00 2001 From: Tomas Slusny Date: Wed, 9 Jul 2025 18:32:29 +0200 Subject: [PATCH] Properly null check opts.glob when rigpgrep is not available Closes #1178 Signed-off-by: Tomas Slusny --- lua/CopilotChat/utils.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/CopilotChat/utils.lua b/lua/CopilotChat/utils.lua index 1be2504b..f2f296d2 100644 --- a/lua/CopilotChat/utils.lua +++ b/lua/CopilotChat/utils.lua @@ -481,7 +481,7 @@ M.scan_dir = async.wrap(function(path, opts, callback) vim.tbl_deep_extend('force', opts, { depth = opts.max_depth, add_dirs = false, - search_pattern = M.glob_to_pattern(opts.glob), + search_pattern = opts.glob and M.glob_to_pattern(opts.glob) or nil, respect_gitignore = not opts.no_ignore, on_exit = function(files) callback(filter_files(files))