Adjust viewport position *after* reload

References https://github.com/tpope/vim-fugitive/issues/1268
This commit is contained in:
Tim Pope 2019-06-29 19:19:09 -04:00
parent 9c195de61b
commit c8ac43422e

View File

@ -2278,13 +2278,16 @@ function! s:Do(action, visual) abort
if status < 0
execute record.lnum + 1
endif
call s:StageReveal()
let success = 1
catch /^fugitive:/
return 'echoerr v:errmsg'
finally
if reload
execute s:ReloadStatus()
endif
if exists('success')
call s:StageReveal()
endif
endtry
return ''
endfunction