Simplify buffer deletion for g:startify_session_delete_buffers
This commit is contained in:
parent
2cdbe64a7d
commit
423eb03de4
2 changed files with 9 additions and 22 deletions
|
@ -365,22 +365,9 @@ endfunction
|
|||
|
||||
" Function: #session_delete_buffers {{{1
|
||||
function! startify#session_delete_buffers()
|
||||
if !get(g:, 'startify_session_delete_buffers', 1)
|
||||
return
|
||||
if get(g:, 'startify_session_delete_buffers', 1)
|
||||
silent %bdelete
|
||||
endif
|
||||
let n = 1
|
||||
while n <= bufnr('$')
|
||||
if buflisted(n)
|
||||
try
|
||||
silent execute 'bdelete' n
|
||||
catch
|
||||
echohl ErrorMsg
|
||||
echomsg v:exception
|
||||
echohl NONE
|
||||
endtry
|
||||
endif
|
||||
let n += 1
|
||||
endwhile
|
||||
endfunction
|
||||
|
||||
" Function: #session_list {{{1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue