nvimdev / dashboard-nvim

vim dashboard
MIT License
2.39k stars 192 forks source link

Hyper theme will crash if the user has no oldfiles history #480

Open opzap opened 2 months ago

opzap commented 2 months ago

https://github.com/nvimdev/dashboard-nvim/blob/fabf5feec96185817c732d47d363f34034212685/lua/dashboard/theme/hyper.lua#L179

mru_list takes the result of utils.get_mru_list() to figure out which OS separator it should use, but this function will always return {} on a fresh install of Neovim.

Lua already provides a safe way to get the directory separator for all systems using package.config:

local sep = package.config:sub(1, 1)