Add a configuration var to open Gundo on the right.

You people are insane.
This commit is contained in:
Steve Losh 2010-10-20 19:51:09 -04:00
parent af4b6e67b9
commit cc806d3f35

View File

@ -45,10 +45,12 @@ endif"}}}
if !exists('g:gundo_width')"{{{ if !exists('g:gundo_width')"{{{
let g:gundo_width = 45 let g:gundo_width = 45
endif"}}} endif"}}}
if !exists('g:gundo_preview_height')"{{{ if !exists('g:gundo_preview_height')"{{{
let g:gundo_preview_height = 15 let g:gundo_preview_height = 15
endif"}}} endif"}}}
if !exists('g:gundo_right')"{{{
let g:gundo_right = 0
endif"}}}
"}}} "}}}
@ -194,7 +196,12 @@ function! s:GundoOpenPreview()"{{{
if existing_preview_buffer == -1 if existing_preview_buffer == -1
exe "vnew __Gundo_Preview__" exe "vnew __Gundo_Preview__"
if g:gundo_right
wincmd L
else
wincmd H wincmd H
endif
else else
let existing_preview_window = bufwinnr(existing_preview_buffer) let existing_preview_window = bufwinnr(existing_preview_buffer)
@ -204,9 +211,14 @@ function! s:GundoOpenPreview()"{{{
endif endif
else else
exe "vsplit +buffer" . existing_preview_buffer exe "vsplit +buffer" . existing_preview_buffer
if g:gundo_right
wincmd L
else
wincmd H wincmd H
endif endif
endif endif
endif
endfunction"}}} endfunction"}}}
function! s:GundoClose()"{{{ function! s:GundoClose()"{{{