diff --git a/lua/dashboard/theme/hyper.lua b/lua/dashboard/theme/hyper.lua index 1e46b95..3f99f22 100644 --- a/lua/dashboard/theme/hyper.lua +++ b/lua/dashboard/theme/hyper.lua @@ -175,10 +175,12 @@ local function mru_list(config) if config.mru.cwd_only then local cwd = uv.cwd() + local sep = utils.is_win and '\\' or '/' + local cwd_with_sep = cwd .. sep mlist = vim.tbl_filter(function(file) - local file_dir = vim.fn.fnamemodify(file, ':p:h') + local file_dir = vim.fn.fnamemodify(file, ':p:h') .. sep if file_dir and cwd then - return file_dir:find(cwd, 1, true) == 1 + return file_dir:sub(1, #cwd_with_sep) == cwd_with_sep end end, mlist) end