mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-11 21:03:53 -05:00
Avoid guioptions=! issues in :Git --paginate
Resolves: https://github.com/tpope/vim-fugitive/issues/1767
This commit is contained in:
@@ -2993,9 +2993,19 @@ function! fugitive#Command(line1, line2, range, bang, mods, arg) abort
|
||||
return 'call fugitive#Resume()|silent checktime' . after
|
||||
elseif pager is# 1
|
||||
let pre = s:BuildEnvPrefix(env)
|
||||
try
|
||||
if exists('+guioptions') && &guioptions =~# '!'
|
||||
let guioptions = &guioptions
|
||||
set guioptions-=!
|
||||
endif
|
||||
silent! execute '!' . escape(pre . s:UserCommand({'git': git, 'dir': dir}, s:disable_colors + flags + ['--no-pager'] + args), '!#%') .
|
||||
\ (&shell =~# 'csh' ? ' >& ' . s:shellesc(state.file) : ' > ' . s:shellesc(state.file) . ' 2>&1')
|
||||
let state.exit_status = v:shell_error
|
||||
finally
|
||||
if exists('guioptions')
|
||||
let &guioptions = guioptions
|
||||
endif
|
||||
endtry
|
||||
redraw!
|
||||
call s:RunSave(state)
|
||||
call s:RunFinished(state)
|
||||
|
||||
Reference in New Issue
Block a user