fix(loader): don't run ftdetect twice for paths already on the rtp during startup. Fixes #839

This commit is contained in:
Folke Lemaitre 2023-05-28 11:02:35 +02:00
parent b4e520579b
commit 36a91320f9
No known key found for this signature in database
GPG Key ID: 41F8B1FBACAE2040
1 changed files with 3 additions and 0 deletions

View File

@ -122,6 +122,9 @@ function M.startup()
Util.track({ start = "rtp plugins" })
for _, path in ipairs(rtp) do
if not path:find("after/?$") then
-- these paths don't will already have their ftdetect ran,
-- by sourcing filetype.lua above, so skip them
M.did_ftdetect[path] = true
M.packadd(path)
end
end