Skip to content

Commit be98986

Browse files
authored
fix(api): fixes subtle bug in api shutdown process (#126)
1 parent 169a2c6 commit be98986

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

lua/checkmate/init.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ function M.stop()
253253
local active_buffers = M.get_active_buffer_list()
254254

255255
-- for every buffer that was active, clear extmarks, diagnostics, keymaps, and autocmds.
256-
for bufnr, _ in pairs(active_buffers) do
256+
for _, bufnr in ipairs(active_buffers) do
257257
require("checkmate.api").shutdown(bufnr)
258258
end
259259

tests/checkmate/lifecycle_spec.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ describe("checkmate init and lifecycle", function()
184184
vim.api.nvim_buf_delete(bufnr, { force = true })
185185
end)
186186
end)
187+
187188
describe("buffer activation", function()
188189
it("should activate on FileType autocmd for matching files", function()
189190
local checkmate = require("checkmate")

0 commit comments

Comments
 (0)