Skip to content

Loading…

bug: forcely close current buffer. #335

Closed
mattn opened this Issue · 6 comments

2 participants

@mattn
  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.

@kien
Owner

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?

@mattn

Try to use type which using acceptfile ?

@kien
Owner

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.

@mattn

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...

@kien
Owner

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
@mattn

Just fixed! Thanks.

@kien kien added a commit that referenced this issue
@kien Check bufnr and bufname before closing
Refs #335
6c49f2a
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.