mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
Merge pull request #16455 from gpanders/diag-set
This commit is contained in:
commit
07223fae54
@ -650,7 +650,7 @@ function M.set(namespace, bufnr, diagnostics, opts)
|
|||||||
end
|
end
|
||||||
|
|
||||||
if vim.api.nvim_buf_is_loaded(bufnr) then
|
if vim.api.nvim_buf_is_loaded(bufnr) then
|
||||||
M.show(namespace, bufnr, diagnostics, opts)
|
M.show(namespace, bufnr, nil, opts)
|
||||||
end
|
end
|
||||||
|
|
||||||
vim.api.nvim_command(
|
vim.api.nvim_command(
|
||||||
|
@ -357,7 +357,7 @@ describe('vim.diagnostic', function()
|
|||||||
|
|
||||||
it("doesn't error after bwipeout on buffer", function()
|
it("doesn't error after bwipeout on buffer", function()
|
||||||
exec_lua [[
|
exec_lua [[
|
||||||
vim.diagnostic.set(diagnostic_ns, diagnostic_bufnr, { lnum = 0, end_lnum = 0, col = 0, end_col = 0 })
|
vim.diagnostic.set(diagnostic_ns, diagnostic_bufnr, {{ lnum = 0, end_lnum = 0, col = 0, end_col = 0 }})
|
||||||
vim.cmd("bwipeout! " .. diagnostic_bufnr)
|
vim.cmd("bwipeout! " .. diagnostic_bufnr)
|
||||||
|
|
||||||
vim.diagnostic.show(diagnostic_ns)
|
vim.diagnostic.show(diagnostic_ns)
|
||||||
@ -653,7 +653,7 @@ describe('vim.diagnostic', function()
|
|||||||
|
|
||||||
it("doesn't error after bwipeout called on buffer", function()
|
it("doesn't error after bwipeout called on buffer", function()
|
||||||
exec_lua [[
|
exec_lua [[
|
||||||
vim.diagnostic.set(diagnostic_ns, diagnostic_bufnr, { lnum = 0, end_lnum = 0, col = 0, end_col = 0 })
|
vim.diagnostic.set(diagnostic_ns, diagnostic_bufnr, {{ lnum = 0, end_lnum = 0, col = 0, end_col = 0 }})
|
||||||
vim.cmd("bwipeout! " .. diagnostic_bufnr)
|
vim.cmd("bwipeout! " .. diagnostic_bufnr)
|
||||||
|
|
||||||
vim.diagnostic.reset(diagnostic_ns)
|
vim.diagnostic.reset(diagnostic_ns)
|
||||||
|
Loading…
Reference in New Issue
Block a user