fix: opening when buffer has scheme path (#2076)

Co-authored-by: Samuel Wall <me@samuelwall.uk>
This commit is contained in:
Sam Wall
2025-06-10 16:39:31 +01:00
committed by GitHub
parent e2b34f6435
commit c7edd87820

View File

@@ -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)