Skip to content

Commit

Permalink
perf: cleanup buffer after position check
Browse files Browse the repository at this point in the history
Prevents buffer leak by properly deleting the temporary buffer after
position check is complete in the simulator.
  • Loading branch information
tris203 committed Dec 20, 2024
1 parent d513d69 commit fe9032c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lua/precognition/sim.lua
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ local function check_pos(string, col, default_config)
end
end

vim.api.nvim_buf_delete(buf, { force = true })

return result
end

Expand Down

0 comments on commit fe9032c

Please sign in to comment.