diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index e679ec1..a62b096 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -3433,6 +3433,11 @@ augroup fugitive_job \ endfor augroup END +function! fugitive#CanPty() abort + return get(g:, 'fugitive_pty_debug_override', + \ has('unix') && !has('win32unix') && (has('patch-8.0.0744') || has('nvim')) && fugitive#GitVersion() !~# '\.windows\>') +endfunction + function! fugitive#PagerFor(argv, ...) abort let args = a:argv if empty(args) @@ -3609,7 +3614,7 @@ function! fugitive#Command(line1, line2, range, bang, mods, arg) abort endif if s:run_jobs call extend(env, {'COLUMNS': '' . (&columns - 1)}, 'keep') - let state.pty = allow_pty && get(g:, 'fugitive_pty', has('unix') && !has('win32unix') && (has('patch-8.0.0744') || has('nvim')) && fugitive#GitVersion() !~# '\.windows\>') + let state.pty = allow_pty && fugitive#CanPty() if !state.pty let args = s:AskPassArgs(dir) + args endif