From 9ec6b55d037651f0a92583cff0a038912266e7f9 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Sun, 5 Jan 2020 01:12:07 -0500 Subject: [PATCH] Improve display of :Gclog --summary --- autoload/fugitive.vim | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 4baa3d4..6b16abc 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -3871,7 +3871,7 @@ endfunction function! s:LogFlushQueue(state) abort let queue = remove(a:state, 'queue') - if a:state.child_found + if a:state.child_found && get(a:state, 'ignore_summary') call remove(queue, 0) endif if len(queue) && queue[-1] ==# {'text': ''} @@ -3910,6 +3910,9 @@ function! s:LogParse(state, dir, line) abort elseif a:line =~# '^@@[^@]*+\d' && has_key(a:state, 'diffing') && has_key(a:state, 'base') let a:state.context = 'hunk' if empty(a:state.target) || a:state.target ==# a:state.diffing + if !a:state.child_found && len(a:state.queue) && a:state.queue[-1] ==# {'text': ''} + call remove(a:state.queue, -1) + endif let a:state.child_found = 1 call add(a:state.queue, { \ 'valid': 1,