From d32b8bfc900c1cbb8ea6520d85779a44e1049b79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=B3n=C3=A1n=20Carrigan?= Date: Sat, 31 Dec 2022 14:58:47 +0000 Subject: [PATCH] fix(quickfix): handle position ID not existing anymore See #187 --- lua/neotest/consumers/quickfix.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/neotest/consumers/quickfix.lua b/lua/neotest/consumers/quickfix.lua index 6f30331a..88d0dacd 100644 --- a/lua/neotest/consumers/quickfix.lua +++ b/lua/neotest/consumers/quickfix.lua @@ -23,7 +23,7 @@ local init = function() local qf_results = {} local buffer_cache = {} for pos_id, result in pairs(results) do - if result.status == "failed" then + if result.status == "failed" and tree:get_key(pos_id) then local pos = assert(tree:get_key(pos_id)):data() if pos.type == "test" then local bufnr = buffer_cache[pos.path]