commit a67854368ea9810936d57e3fea00a4c05bf47c26 (tree)
parent e2883a54261dab9fc1c2cbb39f86a8841047bae4
Author: Tim Pope <code@tpope.net>
Date: Fri, 1 Oct 2021 14:26:58 -0400
Collapse all status buffer diffs on :edit!
References: https://github.com/tpope/vim-fugitive/issues/1563
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim
@@ -2752,6 +2752,9 @@ function! fugitive#BufReadStatus() abort
\ s:LinesError(['diff', '--color=never', '--no-ext-diff', '--no-prefix'])[0]
endif
let b:fugitive_diff = diff
+ if v:cmdbang
+ unlet! b:fugitive_expanded
+ endif
let expanded = get(b:, 'fugitive_expanded', {'Staged': {}, 'Unstaged': {}})
let b:fugitive_expanded = {'Staged': {}, 'Unstaged': {}}