Skip to content

Commit 5965909

Browse files
gpanderstpope
authored andcommitted
Buffer output when using the pager
As of 10ed587 all output is captured to a temp file before being displayed. When the output is not buffered, the stdout/stderr callback is called to perform post-processing for each output chunk. Instead, buffer all output and perform the post-processing all at once. This results in a substantial performance improvement for repositories with many commits.
1 parent 46eaf89 commit 5965909

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

autoload/fugitive.vim

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3933,6 +3933,8 @@ function! fugitive#Command(line1, line2, range, bang, mods, arg, ...) abort
39333933
let job = jobstart(argv, extend(jobopts, {
39343934
\ 'pty': state.pty,
39353935
\ 'TERM': 'dumb',
3936+
\ 'stdout_buffered': pager,
3937+
\ 'stderr_buffered': pager,
39363938
\ 'on_stdout': function('s:RunReceive', [state, tmp, 'out']),
39373939
\ 'on_stderr': function('s:RunReceive', [state, tmp, 'err']),
39383940
\ 'on_exit': function('s:RunClose', [state, tmp]),

0 commit comments

Comments
 (0)