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().
Just fixed! Thanks.
Check bufnr and bufname before closing