From e2dd66b729bec956e5f14d9607bbea4352cd45b7 Mon Sep 17 00:00:00 2001 From: Sam Simmons Date: Fri, 13 Apr 2012 00:42:46 -0500 Subject: [PATCH] added public show/hide methods and matched toggle open/close method --- autoload/gundo.vim | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/autoload/gundo.vim b/autoload/gundo.vim index df9cc64..9a9e5f9 100644 --- a/autoload/gundo.vim +++ b/autoload/gundo.vim @@ -322,11 +322,17 @@ function! s:GundoToggle()"{{{ endfunction"}}} function! s:GundoShow()"{{{ - call s:GundoOpen() + if !s:GundoIsVisible() + let g:gundo_target_n = bufnr('') + let g:gundo_target_f = @% + call s:GundoOpen() + endif endfunction"}}} function! s:GundoHide()"{{{ - call s:GundoClose() + if s:GundoIsVisible() + call s:GundoClose() + endif endfunction"}}} "}}} @@ -442,6 +448,14 @@ function! gundo#GundoToggle()"{{{ call s:GundoToggle() endfunction"}}} +function! gundo#GundoShow()"{{{ + call s:GundoShow() +endfunction"}}} + +function! gundo#GundoHide()"{{{ + call s:GundoHide() +endfunction"}}} + function! gundo#GundoRenderGraph()"{{{ call s:GundoRenderGraph() endfunction"}}}