fix: properly escape session file names on Windows (#7)
This commit is contained in:
parent
2f2b0cc69d
commit
83af96b1f2
@ -5,7 +5,11 @@ local M = {}
|
|||||||
local e = vim.fn.fnameescape
|
local e = vim.fn.fnameescape
|
||||||
|
|
||||||
function M.get_current()
|
function M.get_current()
|
||||||
local name = vim.fn.getcwd():gsub("/", "%%")
|
local pattern = "/"
|
||||||
|
if vim.fn.has("win32") then
|
||||||
|
pattern = '[\\:]'
|
||||||
|
end
|
||||||
|
local name = vim.fn.getcwd():gsub(pattern, "%%")
|
||||||
return Config.options.dir .. name .. ".vim"
|
return Config.options.dir .. name .. ".vim"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user