From 501a138ebc61be064da811cb8c48ddf6eb59a4df Mon Sep 17 00:00:00 2001 From: yetone Date: Thu, 23 Jan 2025 11:56:57 +0800 Subject: [PATCH] fix: none selection in telescope (#1119) --- lua/avante/file_selector.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/avante/file_selector.lua b/lua/avante/file_selector.lua index f21abac..941efe2 100644 --- a/lua/avante/file_selector.lua +++ b/lua/avante/file_selector.lua @@ -204,7 +204,7 @@ function FileSelector:telescope_ui(handler) else local selection = action_state.get_selected_entry() - handler(selection[1]) + if selection and #selection > 0 then handler(selection[1]) end end actions.close(prompt_bufnr)