From 0eb8a0d56f7c87860e69296518237d2ea884a383 Mon Sep 17 00:00:00 2001 From: Konstantin Gorodinskiy Date: Sat, 3 Aug 2013 13:41:26 +0400 Subject: [PATCH] check for single win --- autoload/vundle/scripts.vim | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/autoload/vundle/scripts.vim b/autoload/vundle/scripts.vim index ded6a46..894573e 100644 --- a/autoload/vundle/scripts.vim +++ b/autoload/vundle/scripts.vim @@ -79,6 +79,13 @@ func! vundle#scripts#bundle_names(names) endf func! vundle#scripts#view(title, headers, results) + "testing whether we have + "single empty window + let l:vundle_single_win=0 + if winnr()==1 && line('$') == 1 && getline(1) == '' + let l:vundle_single_win=1 + endif + if exists('g:vundle_view') && bufloaded(g:vundle_view) exec g:vundle_view.'bd!' endif @@ -86,6 +93,9 @@ func! vundle#scripts#view(title, headers, results) exec 'silent pedit [Vundle] '.a:title wincmd P | wincmd H + if l:vundle_single_win==1 + on! + endif let g:vundle_view = bufnr('%') "