From 76b9902873740e5c440009a7d5ed294bf7a35ac5 Mon Sep 17 00:00:00 2001 From: John Fred Fadrigalan Date: Fri, 22 Jul 2022 13:11:48 +0800 Subject: [PATCH] refactor(actions): remove linefeed on info messages. --- lua/nvim-tree/actions/fs/copy-paste.lua | 8 ++++---- lua/nvim-tree/actions/fs/create-file.lua | 2 +- lua/nvim-tree/actions/fs/rename-file.lua | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lua/nvim-tree/actions/fs/copy-paste.lua b/lua/nvim-tree/actions/fs/copy-paste.lua index 7953d8d3cbd..07f2fc13cee 100644 --- a/lua/nvim-tree/actions/fs/copy-paste.lua +++ b/lua/nvim-tree/actions/fs/copy-paste.lua @@ -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) @@ -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 diff --git a/lua/nvim-tree/actions/fs/create-file.lua b/lua/nvim-tree/actions/fs/create-file.lua index 055e4552de8..4308b6332a6 100644 --- a/lua/nvim-tree/actions/fs/create-file.lua +++ b/lua/nvim-tree/actions/fs/create-file.lua @@ -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 diff --git a/lua/nvim-tree/actions/fs/rename-file.lua b/lua/nvim-tree/actions/fs/rename-file.lua index b4ca8e3bc78..6ca8cf83a19 100644 --- a/lua/nvim-tree/actions/fs/rename-file.lua +++ b/lua/nvim-tree/actions/fs/rename-file.lua @@ -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