diff --git a/lua/telescope/_extensions/file_browser/actions.lua b/lua/telescope/_extensions/file_browser/actions.lua index ee44c267..8d4d4615 100644 --- a/lua/telescope/_extensions/file_browser/actions.lua +++ b/lua/telescope/_extensions/file_browser/actions.lua @@ -295,12 +295,23 @@ fb_actions.copy_file = function(prompt_bufnr) end end if destination ~= "" then -- vim.fn.input may return "" on cancellation - file:copy { + local res = file:copy { destination = destination, recursive = true, parents = true, } - print(string.format("\n%s has been copied!", filename)) + + for key, value in pairs(res) do + if key.filename == destination then + local res_msg + if res[key] then + res_msg = string.format("\n%s has been copied!", filename) + else + res_msg = string.format("\n%s has not been copied", filename) + end + a.nvim_echo({ { res_msg } }, false, {}) + end + end end end