fix(lualine): make sure path is in root before substituting

This commit is contained in:
Folke Lemaitre 2024-11-07 17:01:08 +01:00
parent d017bb861e
commit 67b216c973
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040

View file

@ -96,7 +96,7 @@ function M.pretty_path(opts)
if opts.relative == "cwd" and path:find(cwd, 1, true) == 1 then
path = path:sub(#cwd + 2)
else
elseif path:find(root, 1, true) == 1 then
path = path:sub(#root + 2)
end