From c7edd87820ea91a8c6f67ece5c47e27f720e5937 Mon Sep 17 00:00:00 2001 From: Sam Wall Date: Tue, 10 Jun 2025 16:39:31 +0100 Subject: [PATCH] fix: opening when buffer has scheme path (#2076) Co-authored-by: Samuel Wall --- 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 9bc4a6d..6f4fe0c 100644 --- a/lua/avante/file_selector.lua +++ b/lua/avante/file_selector.lua @@ -83,7 +83,7 @@ function FileSelector:reset() end function FileSelector:add_selected_file(filepath) - if not filepath or filepath == "" then return end + if not filepath or filepath == "" or has_scheme(filepath) then return end local absolute_path = (filepath:sub(1, 1) == "/" or filepath:sub(1, 7) == "term://") and filepath or Utils.join_paths(Utils.get_project_root(), filepath)