Skip to content

Commit cd99e43

Browse files
committed
Merge pull request #259 from ctrlpvim/fix-253
unload buffer if called PrtExit
2 parents d9d09b6 + 683bf9c commit cd99e43

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

autoload/ctrlp.vim

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -315,11 +315,11 @@ fu! s:Open()
315315
cal s:setupblank()
316316
endf
317317

318-
fu! s:Close()
318+
fu! s:Close(exit)
319319
cal s:buffunc(0)
320320
if winnr('$') == 1
321321
bw!
322-
el
322+
elsei a:exit
323323
try | bun!
324324
cat | clo! | endt
325325
cal s:unmarksigns()
@@ -908,7 +908,7 @@ endf
908908

909909
fu! s:PrtExit()
910910
if bufnr('%') == s:bufnr && bufname('%') == 'ControlP'
911-
noa cal s:Close()
911+
noa cal s:Close(1)
912912
noa winc p
913913
en
914914
endf
@@ -2534,7 +2534,7 @@ if has('autocmd')
25342534
aug CtrlPAug
25352535
au!
25362536
au BufEnter ControlP cal s:checkbuf()
2537-
au BufLeave ControlP noa cal s:Close()
2537+
au BufLeave ControlP noa cal s:Close(0)
25382538
au VimLeavePre * cal s:leavepre()
25392539
aug END
25402540
en

0 commit comments

Comments
 (0)