fix: only expand if we are not in_fast_event()

This commit is contained in:
Simon Hauser
2021-03-07 08:41:45 +01:00
parent 6e941e0ece
commit 68c30dd560

View File

@@ -65,7 +65,7 @@ previewers.file_maker = function(filepath, bufnr, opts)
local ft = opts.use_ft_detect and pfiletype.detect(filepath) local ft = opts.use_ft_detect and pfiletype.detect(filepath)
if opts.bufname ~= filepath then if opts.bufname ~= filepath then
filepath = vim.fn.expand(filepath) if not vim.in_fast_event() then filepath = vim.fn.expand(filepath) end
local stat = vim.loop.fs_stat(filepath) or {} local stat = vim.loop.fs_stat(filepath) or {}
if stat.type == 'directory' then if stat.type == 'directory' then
pscan.ls_async(filepath, { pscan.ls_async(filepath, {