diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index b694658..07b46fe 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -5216,7 +5216,7 @@ function! s:GrepParseLine(options, quiet, dir, line) abort let match = matchlist(a:line, '^\(.\{-\}\):\(.*\)$') if len(match) let entry.module = match[1] - let entry.pattern = '\M' . escape(match[2], '\') + let entry.pattern = '\M^' . escape(match[2], '\.^$/') . '$' endif endif if empty(entry.module) && a:options.name_count && a:line =~# ':\d\+$'