mirror of
https://github.com/neovim/neovim.git
synced 2026-06-30 23:06:37 +00:00
fix(diagnostic): escape special chars in file names (#16588)
This commit is contained in:
committed by
GitHub
parent
5dcf2c77a9
commit
beac24d6f3
@@ -655,7 +655,10 @@ function M.set(namespace, bufnr, diagnostics, opts)
|
||||
|
||||
vim.api.nvim_buf_call(bufnr, function()
|
||||
vim.api.nvim_command(
|
||||
string.format("doautocmd <nomodeline> DiagnosticChanged %s", vim.api.nvim_buf_get_name(bufnr))
|
||||
string.format(
|
||||
"doautocmd <nomodeline> DiagnosticChanged %s",
|
||||
vim.fn.fnameescape(vim.api.nvim_buf_get_name(bufnr))
|
||||
)
|
||||
)
|
||||
end)
|
||||
end
|
||||
@@ -1339,7 +1342,10 @@ function M.reset(namespace, bufnr)
|
||||
end
|
||||
|
||||
vim.api.nvim_command(
|
||||
string.format("doautocmd <nomodeline> DiagnosticChanged %s", vim.api.nvim_buf_get_name(bufnr))
|
||||
string.format(
|
||||
"doautocmd <nomodeline> DiagnosticChanged %s",
|
||||
vim.fn.fnameescape(vim.api.nvim_buf_get_name(bufnr))
|
||||
)
|
||||
)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user