diff options
| author | Simon Hauser <Simon-Hauser@outlook.de> | 2021-03-07 08:41:45 +0100 |
|---|---|---|
| committer | Simon Hauser <Simon-Hauser@outlook.de> | 2021-03-07 08:41:45 +0100 |
| commit | 68c30dd560f81ab0b11fe8b622b710ca40a1fddb (patch) | |
| tree | 151b650738cd7ec6860331b2bd24ed058a210500 /lua | |
| parent | 6e941e0ecec1ab6a1b4ce40c693ef1272c505abb (diff) | |
fix: only expand if we are not in_fast_event()
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/telescope/previewers/buffer_previewer.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lua/telescope/previewers/buffer_previewer.lua b/lua/telescope/previewers/buffer_previewer.lua index 6fa25de..16031f9 100644 --- a/lua/telescope/previewers/buffer_previewer.lua +++ b/lua/telescope/previewers/buffer_previewer.lua @@ -65,7 +65,7 @@ previewers.file_maker = function(filepath, bufnr, opts) local ft = opts.use_ft_detect and pfiletype.detect(filepath) 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 {} if stat.type == 'directory' then pscan.ls_async(filepath, { |
