mirror of
https://github.com/jiriks74/presence.nvim
synced 2024-11-23 20:37:50 +01:00
Escape newlines in logger
This commit is contained in:
parent
c061fdab11
commit
9bae4debba
@ -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…
x
Reference in New Issue
Block a user