2043d8723096

Merge pull request #12 from narfdotpl/cant-split-commits-into-separate-pull-requests-zomgwtfbbq

Fix window positions
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Fri, 27 May 2011 07:31:02 -0700
parents 8269dd71e3cd (current diff) 0d92eaf03c6a (diff)
children d2406d0bce25
branches/tags (none)
files

Changes

--- a/plugin/gundo.vim	Fri May 27 07:29:14 2011 -0700
+++ b/plugin/gundo.vim	Fri May 27 07:31:02 2011 -0700
@@ -598,11 +598,19 @@
 endfunction"}}}
 
 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()
     exe bufwinnr(g:gundo_target_n) . "wincmd w"
 
     call s:GundoRenderGraph()
     call s:GundoRenderPreview()
+
+    " Restore `splitbelow` value.
+    let &splitbelow = saved_splitbelow
 endfunction"}}}
 
 function! s:GundoToggle()"{{{