diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index ad432a5..84ddd4d 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -4736,7 +4736,7 @@ function! s:GrepSubcommand(line1, line2, range, bang, mods, options) abort let cmd = ['--no-pager', 'grep', '-n', '--no-color', '--full-name'] let tree = s:Tree(dir) let args = a:options.subcommand_args - if get(args, 0, '') =~# '^-O\|--open-files-in-pager$' + if get(args, 0, '') =~# '^\%(-O\|--open-files-in-pager\)$' let args = args[1:-1] endif let name_only = s:HasOpt(args, '-l', '--files-with-matches', '--name-only', '-L', '--files-without-match')