mirror of
https://github.com/jiriks74/presence.nvim
synced 2024-12-28 19:02:35 +01:00
Escape newlines in logger
This commit is contained in:
parent
c061fdab11
commit
9bae4debba
1 changed files with 3 additions and 1 deletions
|
@ -26,8 +26,10 @@ for i = 1, #Log.levels do
|
|||
end
|
||||
|
||||
vim.schedule(function()
|
||||
local escaped_message = vim.fn.escape(message, '"'):gsub("\n", "\\n")
|
||||
|
||||
vim.cmd(string.format("echohl %s", hl))
|
||||
vim.cmd(string.format([[echom "[%s] %s"]], "presence.nvim", vim.fn.escape(message, '"')))
|
||||
vim.cmd(string.format([[echom "[%s] %s"]], "presence.nvim", escaped_message))
|
||||
vim.cmd("echohl NONE")
|
||||
end)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue