diff options
| author | Tom <tapayne88@users.noreply.github.com> | 2022-03-11 09:28:32 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-03-11 10:28:32 +0100 |
| commit | d331433ed82f68beb54135a5b7f9ef02e90a0ade (patch) | |
| tree | 9783fecda8a1c5c82ee9ba9b7a5967b3c727993a /lua | |
| parent | 6d5634b4778248400a1d41e6f763f9469db55ee3 (diff) | |
fix(grep): make filename parser non-greedy (#1785)
To protect against content variation including colon / number
combinations
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/telescope/make_entry.lua | 2 |
1 files changed, 1 insertions, 1 deletions
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) |
