fix: expand/normalize paths more selectively (#2628)

(cherry picked from commit 3b8399c273)
This commit is contained in:
James Trew
2024-05-20 11:10:12 +02:00
committed by Simon Hauser
parent 48960a8164
commit d5fe96ec8a
12 changed files with 80 additions and 26 deletions
@@ -166,7 +166,7 @@ previewers.file_maker = function(filepath, bufnr, opts)
opts.ft = opts.use_ft_detect and pfiletype.detect(filepath)
if opts.bufname ~= filepath then
if not vim.in_fast_event() then
filepath = vim.fn.expand(filepath)
filepath = utils.path_expand(filepath)
end
if type(opts.preview.filetype_hook) == "function" then
if not opts.preview.filetype_hook(filepath, bufnr, opts) then