From 870f88096b020a5500acc48bd397f2e7f5725e8c Mon Sep 17 00:00:00 2001 From: bhagwan Date: Wed, 8 Jun 2022 18:16:02 -0700 Subject: [PATCH] fix(path_shorten): use first path when glob mathes multiple paths --- lua/fzf-lua/path.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/fzf-lua/path.lua b/lua/fzf-lua/path.lua index ce5c6d3..25a773c 100644 --- a/lua/fzf-lua/path.lua +++ b/lua/fzf-lua/path.lua @@ -142,7 +142,7 @@ end function M.lengthen(path) return vim.fn.glob(path:gsub(M.separator(), "%*"..M.separator()) -- remove the starting '*/' if any - :gsub("^%*"..M.separator(), M.separator())) + :gsub("^%*"..M.separator(), M.separator())):match("[^\n]+") end local function lastIndexOf(haystack, needle)