From 6e02e466b13066c46cbde45966bc72cf2c61350d Mon Sep 17 00:00:00 2001 From: naquad Date: Sat, 10 Nov 2012 17:50:41 +0200 Subject: [PATCH 1/3] fix for N mode: dont close buffer --- plugin/buffergator.vim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugin/buffergator.vim b/plugin/buffergator.vim index e36387a..7fb8204 100755 --- a/plugin/buffergator.vim +++ b/plugin/buffergator.vim @@ -691,7 +691,9 @@ function! s:NewCatalogViewer(name, title) endtry endif endif - execute("bwipe " . self.bufnum) + if g:buffergator_viewport_split_policy != 'N' + execute("bwipe " . self.bufnum) + endif endfunction function! l:catalog_viewer.expand_screen() dict From b91a33649b957ef33017741ebef5d05640813116 Mon Sep 17 00:00:00 2001 From: naquad Date: Sat, 10 Nov 2012 19:50:25 +0200 Subject: [PATCH 2/3] fix toggle in N mode --- plugin/buffergator.vim | 1 + 1 file changed, 1 insertion(+) diff --git a/plugin/buffergator.vim b/plugin/buffergator.vim index 7fb8204..b65c05f 100755 --- a/plugin/buffergator.vim +++ b/plugin/buffergator.vim @@ -680,6 +680,7 @@ function! s:NewCatalogViewer(name, title) call self.contract_screen() if a:restore_prev_window if !self.is_usable_viewport(winnr("#")) && self.first_usable_viewport() ==# -1 + execute('buf ' . self.calling_bufnum) else try if !self.is_usable_viewport(winnr("#")) From 7addd4204801b67360d5c4ecbeb9e8160ff3fa5a Mon Sep 17 00:00:00 2001 From: naquad Date: Sat, 10 Nov 2012 19:59:00 +0200 Subject: [PATCH 3/3] fix for tabs browser in N mode --- plugin/buffergator.vim | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/plugin/buffergator.vim b/plugin/buffergator.vim index b65c05f..e64f14f 100755 --- a/plugin/buffergator.vim +++ b/plugin/buffergator.vim @@ -680,7 +680,9 @@ function! s:NewCatalogViewer(name, title) call self.contract_screen() if a:restore_prev_window if !self.is_usable_viewport(winnr("#")) && self.first_usable_viewport() ==# -1 - execute('buf ' . self.calling_bufnum) + if self.calling_bufnum != -1 + execute('buf ' . self.calling_bufnum) + endif else try if !self.is_usable_viewport(winnr("#")) @@ -1524,6 +1526,12 @@ function! s:NewTabCatalogViewer() call self.update_buffers_info() endif " get buffer number of the catalog view buffer, creating it if neccessary + if (a:0 >= 2 && a:2) + let self.calling_bufnum = a:2 + else + let self.calling_bufnum = bufnr("%") + endif + if self.bufnum < 0 || !bufexists(self.bufnum) " create and render a new buffer call self.create_buffer()