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

Ignore buffers with unsaved changes when deleting buffers

Marco Hinz 7 лет назад
Родитель
Сommit
fbd690fc85
2 измененных файлов с 3 добавлено и 1 удалено
  1. 1 1
      autoload/startify.vim
  2. 2 0
      doc/startify.txt

+ 1 - 1
autoload/startify.vim

@@ -366,7 +366,7 @@ endfunction
 " Function: #session_delete_buffers {{{1
 function! startify#session_delete_buffers()
   if get(g:, 'startify_session_delete_buffers', 1)
-    silent %bdelete
+    silent! %bdelete
   endif
 endfunction
 

+ 2 - 0
doc/startify.txt

@@ -336,6 +336,8 @@ Delete all buffers when loading or closing a session:
     - When using |g:startify_session_autoload|.
     - When choosing a session from the Startify buffer.
 
+NOTE: Buffers with unsaved changes are silently ignored.
+
 ------------------------------------------------------------------------------
                                                       *g:startify_change_to_dir*
 >