Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions autoload/ctrlp_bdelete.vim
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,12 @@ function! s:DeleteMarkedBuffers()

" call bdelete on all marked buffers
for fname in marked
let bufid = fname =~ '\[\d\+\*No Name\]$' ? str2nr(matchstr(fname, '\d\+'))
\ : fnamemodify(fname[2:], ':p')
exec "silent! bdelete" bufid
let g:ctrlp_delete_buf_fname = fname
let bufid = fname =~ '\[\d\+\*No Name\]$'
\ ? str2nr(matchstr(matchstr(fname, '\[\d\+\*No Name\]$'), '\d\+'))
\ : fnamemodify(fname, ':p')
let g:ctrlp_delete_buf_bufid = substitute(bufid, ' ', '\\ ', "g")
exec "silent! bdelete" g:ctrlp_delete_buf_bufid
endfor

" refresh ctrlp
Expand Down