Consistently position cursor on :Gstatus

This commit is contained in:
Tim Pope 2019-07-17 14:33:29 -04:00
parent 3d305c75a0
commit ea26a94bde

View File

@ -2185,9 +2185,10 @@ function! s:StatusCommand(line1, line2, range, count, bang, mods, reg, arg, args
\ s:fnameescape(file)
for winnr in range(1, winnr('$'))
if s:cpath(file, fnamemodify(bufname(winbufnr(winnr)), ':p'))
call s:ExpireStatus(-1)
exe winnr . 'wincmd w'
let w:fugitive_status = dir
return s:ReloadStatus()
return 1
endif
endfor
if a:count ==# 0