Просмотр исходного кода

Merge pull request #10 from IvanUkhov/last-window

Do not try to close the last window
jlanzarotta 11 лет назад
Родитель
Сommit
7aeddfcf0d
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      plugin/bufexplorer.vim

+ 1 - 1
plugin/bufexplorer.vim

@@ -904,7 +904,7 @@ function! s:Close()
     let listed = filter(copy(s:MRUList), "buflisted(v:val)")
     let listed = filter(copy(s:MRUList), "buflisted(v:val)")
 
 
     " If we needed to split the main window, close the split one.
     " If we needed to split the main window, close the split one.
-    if s:splitMode != ""
+    if s:splitMode != "" && bufwinnr(s:originBuffer) != -1
         execute "wincmd c"
         execute "wincmd c"
     endif
     endif