From f674916597aacb4b50b73a407489c01990f24231 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Fri, 20 Aug 2021 09:06:44 -0400 Subject: [PATCH] Eliminate speck of repetition around :Git --no-pager It's not the repetition that bothers me so much as the fact these two things belong side by side. --- autoload/fugitive.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 92bd783..e0ad74b 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -3315,7 +3315,8 @@ function! fugitive#Command(line1, line2, range, bang, mods, arg) abort if !explicit_pathspec_option call insert(flags, '--no-literal-pathspecs') endif - if pager is# 0 + let no_pager = pager is# 0 + if no_pager call add(flags, '--no-pager') endif if empty(args) && pager is# -1 @@ -3362,7 +3363,6 @@ function! fugitive#Command(line1, line2, range, bang, mods, arg) abort let i += 1 endwhile call s:PrepareEnv(env, dir) - let no_pager = pager is# 0 if pager is# -1 let pager = fugitive#PagerFor(args, config) endif