From 8cdb51622fbdbf780edff35ee22d74ad9983698e Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Mon, 23 Aug 2021 02:59:09 -0400 Subject: [PATCH] Focus quickfix list after :Ggrep! -q This just feels right. If we're not jumping to a file, we probably want to scroll the list. --- autoload/fugitive.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 0ab68ea..72b2017 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -5376,7 +5376,7 @@ function! s:GrepSubcommand(line1, line2, range, bang, mods, options) abort if quiet let bufnr = bufnr('') silent exe substitute(s:Mods(a:mods), '\', '', '') (listnr < 0 ? 'c' : 'l').'open' - if bufnr != bufnr('') + if bufnr != bufnr('') && !a:bang wincmd p endif end