fix(autocmds): auto create directory on windows for uris. Fixes #2442

This commit is contained in:
Folke Lemaitre committed 2024-03-26 20:48:56 +01:00
1 parent 1910cd5cb7
commit 7d570fad79
1 file changed
+1 -1
+1 -1
View File
@@ -106,7 +106,7 @@ vim.api.nvim_create_autocmd({ "FileType" }, {
vim.api.nvim_create_autocmd({ "BufWritePre" }, { vim.api.nvim_create_autocmd({ "BufWritePre" }, {
group = augroup("auto_create_dir"), group = augroup("auto_create_dir"),
callback = function(event) callback = function(event)
if event.match:match("^%w%w+://") then if event.match:match("^%w%w+:[\\/][\\/]") then
return return
end end
local file = vim.uv.fs_realpath(event.match) or event.match local file = vim.uv.fs_realpath(event.match) or event.match