d11wtq / ctrlp_bdelete.vim

An extension to ctrlp.vim for deleting open buffers
58 stars 14 forks source link

Mixing Buffer Deletion Modes Bug #2

Closed amadeus closed 10 years ago

amadeus commented 10 years ago

Not sure what to title this, but it's easy to reproduce.

1) Launch vim 2) :edit file.txt 3) :edit file2.txt 4) :edit file3.txt 5) Open CtrlPBuf 6) ctrl + z to select a buffer 7) ctrl + @ to delete the selected buffer 8) Press ctrl + @ to delete the next buffer, it won't work.

I have to close CtrlPBuf and re-open it to use the non selection mode.

d11wtq commented 10 years ago

Thanks for the heads-up. I thought I had gotten away with a simple fix of using (slient!) when deleting the buffers (ctrlp doesn't clear it's marked list until you close it and reopen it). I'll have an alternative solution to keep the marked list in sync.

d11wtq commented 10 years ago

I've been able to fix this locally, but it requires a patch to ctrlp, since I need to reset the s:marked variable, which you can't do unless ctrlp itself provides a public interface to do that. Hopefully @kien will accept a PR to add ctrlp#clearmarkedlist.

d11wtq commented 10 years ago

This should now be fixed if you switch to https://github.com/ctrlpvim/ctrlp.vim. Let me know how you go and thanks for reporting! :)