Ignore buffers with unsaved changes when deleting buffers

This commit is contained in:
Marco Hinz 2018-05-05 14:52:22 +02:00
parent 423eb03de4
commit fbd690fc85
No known key found for this signature in database
GPG key ID: 1C980A1B657B4A4F
2 changed files with 3 additions and 1 deletions

View file

@ -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

View file

@ -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*
>