From fcd309f9ea8529d5128474720ecf275bd8ee4ce5 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 19 Oct 2025 23:01:57 +0200 Subject: [PATCH] fix(dashboard): oldfiles filter should return a boolean instead of the result of find. Fixes #2283 --- lua/snacks/dashboard.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/snacks/dashboard.lua b/lua/snacks/dashboard.lua index ee3ee5c8..63089c3f 100644 --- a/lua/snacks/dashboard.lua +++ b/lua/snacks/dashboard.lua @@ -807,7 +807,7 @@ function M.oldfiles(opts) done[file] = true for _, f in ipairs(filter) do 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 want = false break