Commits

kien  committed 9b733e0 Draft

Check bufnr and bufname before closing

  • Participants
  • Parent commits 7841b1b

Comments (0)

Files changed (1)

File autoload/ctrlp.vim

 endf
 
 fu! s:PrtExit()
-	if !has('autocmd') | cal s:Close() | en
-	exe ( winnr('$') == 1 ? 'bw!' : 'winc p' )
+	if bufnr('%') == s:bufnr && bufname('%') == 'ControlP'
+		if !has('autocmd') | cal s:Close() | en
+		exe ( winnr('$') == 1 ? 'bw!' : 'winc p' )
+	en
 endf
 
 fu! s:PrtHistory(...)