Fix bug revealing next hunk

This commit is contained in:
Tim Pope
2019-06-29 20:50:14 -04:00
parent 7c66d544e5
commit 4a94b374d0

View File

@@ -2299,7 +2299,7 @@ function! s:StageReveal(...) abort
while getline(end) =~# '^[ \+-]' while getline(end) =~# '^[ \+-]'
let end += 1 let end += 1
endwhile endwhile
while line('w$') > line('$') && end > line('w$') && line('.') > line('w0') + &scrolloff while line('w$') < line('$') && end > line('w$') && line('.') > line('w0') + &scrolloff
execute "normal! \<C-E>" execute "normal! \<C-E>"
endwhile endwhile
endif endif
@@ -2536,6 +2536,7 @@ function! s:StageDelete(lnum, count) abort
call s:TreeChomp('checkout', 'HEAD^{}', '--', info.paths[0]) call s:TreeChomp('checkout', 'HEAD^{}', '--', info.paths[0])
endif endif
exe s:ReloadStatus() exe s:ReloadStatus()
call s:StageReveal()
let @@ = hash let @@ = hash
return 'checktime|redraw|echomsg ' . return 'checktime|redraw|echomsg ' .
\ string('To restore, :Git cat-file blob '.hash[0:6].' > '.info.paths[0]) \ string('To restore, :Git cat-file blob '.hash[0:6].' > '.info.paths[0])