fix(grep): make filename parser non-greedy (#1785)
To protect against content variation including colon / number combinations
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user