Skip to content

Commit d927e89

Browse files
authored
refactor(actions): remove linefeed on info messages. (#1450)
1 parent 08ab346 commit d927e89

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

lua/nvim-tree/actions/fs/copy-paste.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,11 @@ local function add_to_clipboard(node, clip)
120120
for idx, _node in ipairs(clip) do
121121
if _node.absolute_path == node.absolute_path then
122122
table.remove(clip, idx)
123-
return utils.notify.info(node.absolute_path .. " removed to clipboard.\n")
123+
return utils.notify.info(node.absolute_path .. " removed to clipboard.")
124124
end
125125
end
126126
table.insert(clip, node)
127-
utils.notify.info(node.absolute_path .. " added to clipboard.\n")
127+
utils.notify.info(node.absolute_path .. " added to clipboard.")
128128
end
129129

130130
function M.copy(node)
@@ -218,11 +218,11 @@ local function copy_to_clipboard(content)
218218
if M.use_system_clipboard == true then
219219
vim.fn.setreg("+", content)
220220
vim.fn.setreg('"', content)
221-
return utils.notify.info(string.format("Copied %s to system clipboard! \n", content))
221+
return utils.notify.info(string.format("Copied %s to system clipboard!", content))
222222
else
223223
vim.fn.setreg('"', content)
224224
vim.fn.setreg("1", content)
225-
return utils.notify.info(string.format("Copied %s to neovim clipboard \n", content))
225+
return utils.notify.info(string.format("Copied %s to neovim clipboard!", content))
226226
end
227227
end
228228

lua/nvim-tree/actions/fs/create-file.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ function M.fn(node)
100100
end
101101
end
102102
if not is_error then
103-
utils.notify.info(new_file_path .. " was properly created\n")
103+
utils.notify.info(new_file_path .. " was properly created")
104104
end
105105
events._dispatch_folder_created(new_file_path)
106106
if M.enable_reload then

lua/nvim-tree/actions/fs/rename-file.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function M.rename(node, to)
2020
if not success then
2121
return utils.notify.warn(err_fmt(node.absolute_path, to, err))
2222
end
23-
utils.notify.info(node.absolute_path .. "" .. to .. "\n")
23+
utils.notify.info(node.absolute_path .. "" .. to)
2424
utils.rename_loaded_buffers(node.absolute_path, to)
2525
events._dispatch_node_renamed(node.absolute_path, to)
2626
end

0 commit comments

Comments
 (0)