From 67b216c973dd03fee84e362465266bab96402831 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 7 Nov 2024 17:01:08 +0100 Subject: [PATCH] fix(lualine): make sure path is in root before substituting --- lua/lazyvim/util/lualine.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/util/lualine.lua b/lua/lazyvim/util/lualine.lua index 4c8c28a8..db8311c4 100644 --- a/lua/lazyvim/util/lualine.lua +++ b/lua/lazyvim/util/lualine.lua @@ -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