mirror of https://github.com/folke/lazy.nvim.git
fix(loader): normalize rtp paths on windows #230
This commit is contained in:
parent
68ee0cbe2d
commit
a4bd4dc4a7
|
@ -282,7 +282,12 @@ function M.add_to_rtp(plugin)
|
||||||
local rtp = vim.api.nvim_get_runtime_file("", true)
|
local rtp = vim.api.nvim_get_runtime_file("", true)
|
||||||
local idx_dir, idx_after
|
local idx_dir, idx_after
|
||||||
|
|
||||||
|
local is_win = jit.os:find("Windows")
|
||||||
|
|
||||||
for i, path in ipairs(rtp) do
|
for i, path in ipairs(rtp) do
|
||||||
|
if is_win then
|
||||||
|
path = Util.norm(path)
|
||||||
|
end
|
||||||
if path == Config.me then
|
if path == Config.me then
|
||||||
idx_dir = i + 1
|
idx_dir = i + 1
|
||||||
elseif not idx_after and path:sub(-6, -1) == "/after" then
|
elseif not idx_after and path:sub(-6, -1) == "/after" then
|
||||||
|
|
Loading…
Reference in New Issue