mirror of
https://github.com/zoriya/telescope.nvim.git
synced 2026-06-04 03:36:04 +00:00
fix: exclude directories from oldfiles picker (#2485)
(cherry picked from commit 0900f6fcaa)
This commit is contained in:
committed by
Simon Hauser
parent
ce5cc56dee
commit
a49c3aa977
@@ -512,7 +512,8 @@ internal.oldfiles = function(opts)
|
||||
end
|
||||
|
||||
for _, file in ipairs(vim.v.oldfiles) do
|
||||
if vim.loop.fs_stat(file) and not vim.tbl_contains(results, file) and file ~= current_file then
|
||||
local file_stat = vim.loop.fs_stat(file)
|
||||
if file_stat and file_stat.type == "file" and not vim.tbl_contains(results, file) and file ~= current_file then
|
||||
table.insert(results, file)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user