Skip to content

refactor(actions): remove linefeed on info messages. #1450

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions lua/nvim-tree/actions/fs/copy-paste.lua
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,11 @@ local function add_to_clipboard(node, clip)
for idx, _node in ipairs(clip) do
if _node.absolute_path == node.absolute_path then
table.remove(clip, idx)
return utils.notify.info(node.absolute_path .. " removed to clipboard.\n")
return utils.notify.info(node.absolute_path .. " removed to clipboard.")
end
end
table.insert(clip, node)
utils.notify.info(node.absolute_path .. " added to clipboard.\n")
utils.notify.info(node.absolute_path .. " added to clipboard.")
end

function M.copy(node)
Expand Down Expand Up @@ -218,11 +218,11 @@ local function copy_to_clipboard(content)
if M.use_system_clipboard == true then
vim.fn.setreg("+", content)
vim.fn.setreg('"', content)
return utils.notify.info(string.format("Copied %s to system clipboard! \n", content))
return utils.notify.info(string.format("Copied %s to system clipboard!", content))
else
vim.fn.setreg('"', content)
vim.fn.setreg("1", content)
return utils.notify.info(string.format("Copied %s to neovim clipboard \n", content))
return utils.notify.info(string.format("Copied %s to neovim clipboard!", content))
end
end

Expand Down
2 changes: 1 addition & 1 deletion lua/nvim-tree/actions/fs/create-file.lua
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ function M.fn(node)
end
end
if not is_error then
utils.notify.info(new_file_path .. " was properly created\n")
utils.notify.info(new_file_path .. " was properly created")
end
events._dispatch_folder_created(new_file_path)
if M.enable_reload then
Expand Down
2 changes: 1 addition & 1 deletion lua/nvim-tree/actions/fs/rename-file.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function M.rename(node, to)
if not success then
return utils.notify.warn(err_fmt(node.absolute_path, to, err))
end
utils.notify.info(node.absolute_path .. " ➜ " .. to .. "\n")
utils.notify.info(node.absolute_path .. " ➜ " .. to)
utils.rename_loaded_buffers(node.absolute_path, to)
events._dispatch_node_renamed(node.absolute_path, to)
end
Expand Down