mirror of
https://github.com/LunarVim/LunarVim.git
synced 2025-08-31 07:09:23 +02:00
fix string cannot contain newlines
error while showing diagnostics (#1487)
This commit is contained in:
parent
9eeb4f23da
commit
2ccae0a746
1 changed files with 2 additions and 1 deletions
|
@ -89,7 +89,8 @@ function M.show_line_diagnostics()
|
|||
vim.api.nvim_win_set_option(winnr, "winblend", 0)
|
||||
vim.api.nvim_buf_set_var(bufnr, "lsp_floating_window", winnr)
|
||||
for i, diag in ipairs(diags) do
|
||||
vim.api.nvim_buf_set_lines(bufnr, i - 1, i - 1, 0, { diag.message })
|
||||
local message = diag.message:gsub("[\n\r]", " ")
|
||||
vim.api.nvim_buf_set_lines(bufnr, i - 1, i - 1, 0, { message })
|
||||
vim.api.nvim_buf_add_highlight(
|
||||
bufnr,
|
||||
-1,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue