diff --git a/lua/nvim-tree/actions/create-file.lua b/lua/nvim-tree/actions/create-file.lua index beeb0e55..6d65e517 100644 --- a/lua/nvim-tree/actions/create-file.lua +++ b/lua/nvim-tree/actions/create-file.lua @@ -62,7 +62,7 @@ function M.fn(node) local containing_folder = get_containing_folder(node) - local input_opts = { prompt = "Create file", default = containing_folder } + local input_opts = { prompt = "Create file ", default = containing_folder } vim.ui.input(input_opts, function(new_file_path) if not new_file_path or new_file_path == containing_folder then diff --git a/lua/nvim-tree/actions/rename-file.lua b/lua/nvim-tree/actions/rename-file.lua index c33f19af..5e359f69 100644 --- a/lua/nvim-tree/actions/rename-file.lua +++ b/lua/nvim-tree/actions/rename-file.lua @@ -17,7 +17,7 @@ function M.fn(with_sub) local namelen = node.name:len() local abs_path = with_sub and node.absolute_path:sub(0, namelen * -1 - 1) or node.absolute_path - local input_opts = { prompt = "Rename to", default = abs_path } + local input_opts = { prompt = "Rename to ", default = abs_path } vim.ui.input(input_opts, function(new_file_path) if not new_file_path then @@ -33,6 +33,7 @@ function M.fn(with_sub) if not success then return a.nvim_err_writeln("Could not rename " .. node.absolute_path .. " to " .. new_file_path) end + utils.clear_prompt() a.nvim_out_write(node.absolute_path .. " ➜ " .. new_file_path .. "\n") utils.rename_loaded_buffers(node.absolute_path, new_file_path) events._dispatch_node_renamed(abs_path, new_file_path)