Fix window positions.
Graph and diff windows were swapped if user set `splitbelow` to 1: :set splitbelow :set nosplitbelow +---+---+ +---+---+ | D | | | G | | +---+ S | +---+ S | | G | | | D | | +---+---+ +---+---+ D - diff, G - graph, S - source This commit fixes this -- now diff is displayed below graph regardless of `splitbelow` setting.
This commit is contained in:
parent
584f1d52f8
commit
fc9daff259
@ -598,11 +598,19 @@ function! s:GundoClose()"{{{
|
|||||||
endfunction"}}}
|
endfunction"}}}
|
||||||
|
|
||||||
function! s:GundoOpen()"{{{
|
function! s:GundoOpen()"{{{
|
||||||
|
" Save `splitbelow` value and set it to default to avoid problems with
|
||||||
|
" positioning new windows.
|
||||||
|
let saved_splitbelow = &splitbelow
|
||||||
|
let &splitbelow = 0
|
||||||
|
|
||||||
call s:GundoOpenPreview()
|
call s:GundoOpenPreview()
|
||||||
exe bufwinnr(g:gundo_target_n) . "wincmd w"
|
exe bufwinnr(g:gundo_target_n) . "wincmd w"
|
||||||
|
|
||||||
call s:GundoRenderGraph()
|
call s:GundoRenderGraph()
|
||||||
call s:GundoRenderPreview()
|
call s:GundoRenderPreview()
|
||||||
|
|
||||||
|
" Restore `splitbelow` value.
|
||||||
|
let &splitbelow = saved_splitbelow
|
||||||
endfunction"}}}
|
endfunction"}}}
|
||||||
|
|
||||||
function! s:GundoToggle()"{{{
|
function! s:GundoToggle()"{{{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user