aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/diagnostic.lua
diff options
context:
space:
mode:
authorGregory Anders <8965202+gpanders@users.noreply.github.com>2021-09-23 10:52:21 -0600
committerGitHub <noreply@github.com>2021-09-23 09:52:21 -0700
commit9cde1e5891b6d935dd47c12be8c3c89e00d2e1e8 (patch)
treef818282696c446b98183dcfa913b2fd267d57f6c /runtime/lua/vim/diagnostic.lua
parent057606e845f36df045466af2821244026b6cf0f3 (diff)
downloadrneovim-9cde1e5891b6d935dd47c12be8c3c89e00d2e1e8.tar.gz
rneovim-9cde1e5891b6d935dd47c12be8c3c89e00d2e1e8.tar.bz2
rneovim-9cde1e5891b6d935dd47c12be8c3c89e00d2e1e8.zip
fix(diagnostic): check for nil in show_diagnostics (#15772)
Diffstat (limited to 'runtime/lua/vim/diagnostic.lua')
-rw-r--r--runtime/lua/vim/diagnostic.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/lua/vim/diagnostic.lua b/runtime/lua/vim/diagnostic.lua
index 0539da676e..3f41ee5df8 100644
--- a/runtime/lua/vim/diagnostic.lua
+++ b/runtime/lua/vim/diagnostic.lua
@@ -379,7 +379,7 @@ end
---@param diagnostics table: The diagnostics to display
---@return table {popup_bufnr, win_id}
local function show_diagnostics(opts, diagnostics)
- if vim.tbl_isempty(diagnostics) then
+ if not diagnostics or vim.tbl_isempty(diagnostics) then
return
end
local lines = {}