mirror of
https://github.com/neovim/neovim.git
synced 2026-09-03 04:43:48 +00:00
Problem: When disabling, the loader list is traversed forwards while entries are removed. As a result, some entries are skipped and remain active. Thus, disabling `vim.loader` restores `_G.loadfile`, but does not fully restore the original package loader chain. Solution: Traverse `package.loaders` in reverse when removing cached loaders. Capture the original `package.loaders` list in the test, and assert that the list is restored properly.