commit 5c39cde2024a4c9da489ec47fc8ea34340897207 (tree)
parent f7de229fe774f9b56fd86e1805416ce1a5b5a4ca
Author: Tim Pope <code@tpope.net>
Date: Mon, 23 Aug 2021 02:58:35 -0400
Don't match git grep "BUG:" lines as filename
Found this playing around with git grep --no-index /absolute/path.
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim
@@ -5198,13 +5198,13 @@ function! s:GrepParseLine(options, quiet, dir, line) abort
endif
let entry = {'valid': 1}
let match = matchlist(a:line, '^\(.\{-\}\):\([1-9]\d*\):\([1-9]\d*:\)\=\(.*\)$')
- if len(match)
+ if a:line =~# '^git: \|^usage: \|^error: \|^fatal: \|^BUG: '
+ return {'text': a:line}
+ elseif len(match)
let entry.module = match[1]
let entry.lnum = +match[2]
let entry.col = +match[3]
let entry.text = match[4]
- elseif a:line =~# '^git: \|^usage: \|^error: \|^fatal: '
- return {'text': a:line}
else
let entry.module = matchstr(a:line, '\CBinary file \zs.*\ze matches$')
if len(entry.module)