Skip to content

Commit

Permalink
fix: crash in diagnostics consumer (#84)
Browse files Browse the repository at this point in the history
  • Loading branch information
stevearc authored Aug 2, 2022
1 parent c76f3be commit 6a825a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/neotest/consumers/diagnostic.lua
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ local function init(client)
--- Could be thousands of file paths in the results. To avoid checking if each one is loaded which involves a
--- vimscript call to bufnr, we create the set of buffers that are loaded and check against that.
local valid_bufs = {}
for _, bufnr in async.api.nvim_list_bufs() do
for _, bufnr in ipairs(async.api.nvim_list_bufs()) do
local bufpath = async.fn.fnamemodify(async.api.nvim_buf_get_name(bufnr), ":p")
valid_bufs[bufpath] = true
end
Expand Down

0 comments on commit 6a825a6

Please sign in to comment.