Respect 'splitbelow' in :Gstatus

References https://github.com/tpope/vim-fugitive/issues/1169
This commit is contained in:
Tim Pope
2019-01-27 07:52:59 -05:00
parent 50cf1b3bd1
commit d27dbc40d4

View File

@@ -1909,7 +1909,7 @@ function! s:Status(bang, count, mods) abort
try
let mods = a:mods ==# '<mods>' || empty(a:mods) ? '' : a:mods . ' '
if mods !~# 'aboveleft\|belowright\|leftabove\|rightbelow\|topleft\|botright'
let mods = 'topleft ' . mods
let mods = (&splitbelow ? 'botright ' : 'topleft ') . mods
endif
let file = fugitive#Find(':')
let arg = ' +setl\ foldmethod=syntax\ foldlevel=1\|let\ w:fugitive_status=FugitiveGitDir() ' .