Allow PTY for paginated shortlog, to prevent stdin read

This workaround only works where PTY jobs are supported.  The real fix
is to give an explicit argument: `:Git shortlog HEAD`.

Resolves: https://github.com/tpope/vim-fugitive/issues/2100
This commit is contained in:
Tim Pope
2023-01-11 20:09:37 -05:00
parent 99cdb88bc6
commit 9c5f675db5

View File

@@ -3802,7 +3802,7 @@ function! fugitive#Command(line1, line2, range, bang, mods, arg, ...) abort
let stream = exists('*setbufline')
let do_edit = substitute(s:Mods(a:mods, 'Edge'), '\<tab\>', '-tab', 'g') . 'pedit!'
elseif pager
let allow_pty = 0
let allow_pty = get(args, 0, '') is# 'shortlog'
if pager is# 2 && a:bang && a:line2 >= 0
let [do_edit, after_edit] = s:ReadPrepare(a:line1, a:line2, a:range, a:mods)
elseif pager is# 2 && a:bang