prompt-toolkit / pyvim

Pure Python Vim clone.
BSD 3-Clause "New" or "Revised" License
2.52k stars 161 forks source link

Buffer indexing has wrong order #39

Open lunemec opened 9 years ago

lunemec commented 9 years ago

In vim when you open another buffer, it has current buffer number + 1. Now in pyvim it has buffer 0. Try openning one file, it gets buffer id 0. Open another file, and that now has also buffer id 0, but the previous opened file has buffer id 1. It should be indexed from buffer 1 up. First file gets buffer 1, another file gets buffer 2 .. etc. ..

lunemec commented 9 years ago

Oh, I just noticed, buffers are being sorted alphabetically when accesed via :b N

lunemec commented 9 years ago

I don't know about this, this may not be a bug, but difference from vim. In vim you tend to end up with buffer numbering holes after closing some buffers, you can then have buffers 1, 5, 6, 7, 10, 20 .. and that is confusing. But in pyvim when you close buffer, the buffer numbers are reindexed. Was this done on purpose?