mirror of
https://github.com/folke/persistence.nvim.git
synced 2025-07-17 17:23:29 +02:00
fix: windows
This commit is contained in:
parent
f18d0131ed
commit
2d83b1a5c3
1 changed files with 3 additions and 0 deletions
|
@ -101,6 +101,9 @@ function M.select()
|
||||||
local file = session:sub(#Config.options.dir + 1, -5)
|
local file = session:sub(#Config.options.dir + 1, -5)
|
||||||
local dir, branch = unpack(vim.split(file, "%%", { plain = true }))
|
local dir, branch = unpack(vim.split(file, "%%", { plain = true }))
|
||||||
dir = dir:gsub("%%", "/")
|
dir = dir:gsub("%%", "/")
|
||||||
|
if jit.os:find("Windows") then
|
||||||
|
dir = dir:gsub("^(%w)/", "%1:/")
|
||||||
|
end
|
||||||
if not have[dir] then
|
if not have[dir] then
|
||||||
have[dir] = true
|
have[dir] = true
|
||||||
items[#items + 1] = { session = session, dir = dir, branch = branch }
|
items[#items + 1] = { session = session, dir = dir, branch = branch }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue