mirror of
https://github.com/folke/persistence.nvim.git
synced 2025-07-19 18:25:02 +02:00
fix: properly escape session file names on Windows (#7)
This commit is contained in:
parent
2f2b0cc69d
commit
83af96b1f2
1 changed files with 5 additions and 1 deletions
|
@ -5,7 +5,11 @@ local M = {}
|
|||
local e = vim.fn.fnameescape
|
||||
|
||||
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"
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue