From fd5b5530299928a837edba9881036133188ed176 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Mon, 12 Jul 2021 15:41:12 -0400 Subject: [PATCH] Tighten loose regexp --- autoload/fugitive.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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')