diff --git a/plugin/minibufexpl.vim b/plugin/minibufexpl.vim index e2b3348..979e647 100644 --- a/plugin/minibufexpl.vim +++ b/plugin/minibufexpl.vim @@ -582,7 +582,10 @@ function! StartExplorer(curBufNum) return endif - call CreateWindow('-MiniBufExplorer-', g:miniBufExplVSplit, g:miniBufExplBRSplit, g:miniBufExplSplitToEdge, 1, 1) + try + call CreateWindow('-MiniBufExplorer-', g:miniBufExplVSplit, g:miniBufExplBRSplit, g:miniBufExplSplitToEdge, 1, 1) + catch /.*/ + endtry let l:winNum = FindWindow('-MiniBufExplorer-', 1) @@ -2456,7 +2459,10 @@ function! s:SwitchWindow(action, ...) call DEBUG('previous window is: '.winnr(),10) let l:wincmd = l:aucmd.l:winnr.'wincmd '.a:action call DEBUG('window switching command is: '.l:wincmd,10) - exec l:wincmd + try + exec l:wincmd + catch /.*/ + endtry call DEBUG('current window is: '.winnr(),10) call DEBUG('Leaving SwitchWindow()',10)