Reveal folds when using jump maps in commits

This commit is contained in:
Maksim Odnoletkov
2019-09-06 00:46:36 +01:00
committed by Tim Pope
parent 35f1095f9b
commit 26f6037de6

View File

@@ -2628,8 +2628,9 @@ function! s:Do(action, visual) abort
return '' return ''
endfunction endfunction
function! s:StageReveal(...) abort function! s:StageReveal() abort
let begin = a:0 ? a:1 : line('.') exe 'normal! zv'
let begin = line('.')
if getline(begin) =~# '^@' if getline(begin) =~# '^@'
let end = begin + 1 let end = begin + 1
while getline(end) =~# '^[ \+-]' while getline(end) =~# '^[ \+-]'