From fbd690fc85a06669a518b2f201f44a26e66fd84b Mon Sep 17 00:00:00 2001 From: Marco Hinz Date: Sat, 5 May 2018 14:52:22 +0200 Subject: [PATCH] Ignore buffers with unsaved changes when deleting buffers --- autoload/startify.vim | 2 +- doc/startify.txt | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/autoload/startify.vim b/autoload/startify.vim index b67b4db..15a43ec 100644 --- a/autoload/startify.vim +++ b/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 diff --git a/doc/startify.txt b/doc/startify.txt index a6e5a85..64c411d 100644 --- a/doc/startify.txt +++ b/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* >