fix: exclude directories from oldfiles picker (#2485)
This commit is contained in:
@@ -519,7 +519,8 @@ internal.oldfiles = function(opts)
|
|||||||
end
|
end
|
||||||
|
|
||||||
for _, file in ipairs(vim.v.oldfiles) do
|
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)
|
table.insert(results, file)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user