Skip to content


bug: forcely close current buffer. #335

mattn opened this Issue · 6 comments

2 participants

  1. type CTRL-P
  2. choose file
  3. type CTRL-P to open another file
  4. but quit with ESC

The first file will be gone.


I can't reproduce it. Can you try reproducing it in a clean environment? If not then can you narrow it down and find out what might be interfering?


Try to use type which using acceptfile ?


Can you rephrase that? Not sure if I understand what you mean.

Also, this would have been a major problem for a lot of people if it was easy to reproduce. I think something else in your Vim setup is probably interfering. It might be an autocmd, or something custom.


I'm using ctrlp-git. And this extension uses acceptfile to open the file.
But ctrlp-git does not close anything. So I wonder why current buffer is closed...


It's because of the 'exit': 'ctrlp#exit()' key:value pair in s:git_files_var. You don't need that if you use the builtin ctrlp#acceptfile().

@kien kien closed this

Just fixed! Thanks.

@kien kien added a commit that referenced this issue
@kien Check bufnr and bufname before closing
Refs #335
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.