Skip to content

Commit

Permalink
fix(cache): dont update rtp in fast events
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Dec 29, 2022
1 parent 6c0b803 commit 4b75d06
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lua/lazy/core/cache.lua
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,9 @@ end

-- returns the cached RTP excluding plugin dirs
function M.get_rtp()
if vim.in_fast_event() then
return M.rtp or {}
end
local rtp = vim.api.nvim_list_runtime_paths()
if not M.rtp or #rtp ~= M.rtp_total then
M.rtp_total = #rtp
Expand All @@ -299,7 +302,7 @@ function M.get_rtp()
end
end
end
for _, path in ipairs(vim.api.nvim_list_runtime_paths()) do
for _, path in ipairs(rtp) do
---@type string
path = path:gsub("\\", "/")
if not skip[path] and not path:find("after/?$") then
Expand Down

0 comments on commit 4b75d06

Please sign in to comment.