Skip to content

Commit

Permalink
fix(loader): normalize rtp paths on windows #230
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Dec 29, 2022
1 parent 68ee0cb commit a4bd4dc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lua/lazy/core/loader.lua
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,12 @@ function M.add_to_rtp(plugin)
local rtp = vim.api.nvim_get_runtime_file("", true)
local idx_dir, idx_after

local is_win = jit.os:find("Windows")

for i, path in ipairs(rtp) do
if is_win then
path = Util.norm(path)
end
if path == Config.me then
idx_dir = i + 1
elseif not idx_after and path:sub(-6, -1) == "/after" then
Expand Down

0 comments on commit a4bd4dc

Please sign in to comment.