From 26f6037de68254376cd062286aeeaa7db804a973 Mon Sep 17 00:00:00 2001 From: Maksim Odnoletkov Date: Fri, 6 Sep 2019 00:46:36 +0100 Subject: [PATCH] Reveal folds when using jump maps in commits --- autoload/fugitive.vim | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 1a07df3..9f63a33 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -2628,8 +2628,9 @@ function! s:Do(action, visual) abort return '' endfunction -function! s:StageReveal(...) abort - let begin = a:0 ? a:1 : line('.') +function! s:StageReveal() abort + exe 'normal! zv' + let begin = line('.') if getline(begin) =~# '^@' let end = begin + 1 while getline(end) =~# '^[ \+-]'