mirror of
https://github.com/folke/snacks.nvim
synced 2025-12-23 08:47:57 +00:00
fix(dashboard): oldfiles filter should return a boolean instead of the result of find. Fixes #2283
This commit is contained in:
parent
308d7d263c
commit
fcd309f9ea
1 changed files with 1 additions and 1 deletions
|
|
@ -807,7 +807,7 @@ function M.oldfiles(opts)
|
||||||
done[file] = true
|
done[file] = true
|
||||||
for _, f in ipairs(filter) do
|
for _, f in ipairs(filter) do
|
||||||
local matches = file:sub(1, #f.path) == f.path
|
local matches = file:sub(1, #f.path) == f.path
|
||||||
and (file == f.path or file:sub(#f.path + 1, #f.path + 1):find("[/\\]"))
|
and (file == f.path or file:sub(#f.path + 1, #f.path + 1):find("[/\\]") ~= nil)
|
||||||
if matches ~= f.want then
|
if matches ~= f.want then
|
||||||
want = false
|
want = false
|
||||||
break
|
break
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue