From d331433ed82f68beb54135a5b7f9ef02e90a0ade Mon Sep 17 00:00:00 2001 From: Tom Date: Fri, 11 Mar 2022 09:28:32 +0000 Subject: [PATCH] fix(grep): make filename parser non-greedy (#1785) To protect against content variation including colon / number combinations --- lua/telescope/make_entry.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/telescope/make_entry.lua b/lua/telescope/make_entry.lua index 9881097..df2d608 100644 --- a/lua/telescope/make_entry.lua +++ b/lua/telescope/make_entry.lua @@ -112,7 +112,7 @@ do -- Gets called only once to parse everything out for the vimgrep, after that looks up directly. local parse = function(t) - local _, _, filename, lnum, col, text = string.find(t.value, [[(.+):(%d+):(%d+):(.*)]]) + local _, _, filename, lnum, col, text = string.find(t.value, [[(..-):(%d+):(%d+):(.*)]]) local ok ok, lnum = pcall(tonumber, lnum)