motiejus/dotfiles

Unnamed repository; edit this file 'description' to name the repository.
git clone https://git.jakstys.lt/motiejus/dotfiles.git
Log | Tree | Refs | README | LICENSE

commit acf3cb44003eb758d73034c3a86b23af32652dfb (tree)
parent 9c74c0d0a7ffdbea23cf48abedf934c6be65b78b
Author: Tim Pope <code@tpope.net>
Date:   Thu,  3 Jan 2019 16:33:44 -0500

Reveal full hunk on :Gstatus CTRL-N

Diffstat:
Mautoload/fugitive.vim | 15+++++++++++++++
1 file changed, 15 insertions(+), 0 deletions(-)

diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim @@ -2057,10 +2057,24 @@ function! s:StageInfo(...) abort \ 'index': index} endfunction +function! s:StageReveal(...) abort + let begin = a:0 ? a:1 : line('.') + if getline(begin) =~# '^@' + let end = line(begin) + 1 + while getline(end) =~# '^[ \+-]' + let end += 1 + endwhile + while end > line('w$') && line('.') > line('w0') + &scrolloff + execute "normal! \<C-E>" + endwhile + endif +endfunction + function! s:StageNext(count) abort for i in range(a:count) call search('^[A-Z?] .\|^[0-9a-f]\{4,\} \|^@','W') endfor + call s:StageReveal() return '.' endfunction @@ -2071,6 +2085,7 @@ function! s:StagePrevious(count) abort for i in range(a:count) call search('^[A-Z?] .\|^[0-9a-f]\{4,\} \|^@','Wbe') endfor + call s:StageReveal() return '.' endif endfunction