mirror of
https://github.com/folke/snacks.nvim
synced 2025-08-04 02:38:46 +00:00
feat(compat): added svim
, a compatibility layer for Neovim. Closes #1321
This commit is contained in:
parent
7d10a38c44
commit
bc902f7032
37 changed files with 133 additions and 90 deletions
|
@ -107,7 +107,7 @@ end
|
|||
---@param src string
|
||||
function M.resolve(buf, src)
|
||||
src = M.url_decode(src)
|
||||
local file = vim.fs.normalize(vim.api.nvim_buf_get_name(buf))
|
||||
local file = svim.fs.normalize(vim.api.nvim_buf_get_name(buf))
|
||||
local s = Snacks.image.config.resolve and Snacks.image.config.resolve(file, src) or nil
|
||||
if s then
|
||||
return s
|
||||
|
@ -130,7 +130,7 @@ function M.resolve(buf, src)
|
|||
break
|
||||
end
|
||||
end
|
||||
src = vim.fs.normalize(src)
|
||||
src = svim.fs.normalize(src)
|
||||
end
|
||||
return src
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue