Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong order of buffers #12

Closed
mikehaertl opened this issue Jun 2, 2013 · 6 comments
Closed

Wrong order of buffers #12

mikehaertl opened this issue Jun 2, 2013 · 6 comments

Comments

@mikehaertl
Copy link

I can't say, how i managed to get this, but i've seen it several times now: MBE sometimes messes up the buffer order, so that e.g. the order is 1, 5, 4 instead of 1,,4,5. This can be irritating for example if you're on buffer 1 and want to switch to the right next buffer (5), but it activates buffer 4 instead.

It would be good to have the buffers sorted in ascending order.

@weynhamz
Copy link
Owner

weynhamz commented Jun 2, 2013

@mikehaertl How do you switch buffers? 'bn'? 'bp'? or MBE's command 'MBEbn', 'MBEbp', 'MBEbb', 'MBEbf', the last two switch buffers in MRU order, also, there is a config option 'let g:miniBufExplSortBy=mru' to make MBE show buffers in MRU order.

@mikehaertl
Copy link
Author

Thanks, i used bn / bp. I've changed to your suggestions. Guess that will fix the issue.

@saamalik
Copy link

@techlivezheng is it possible to introduce an option which sorts buffers in ascending buffer number order after a new buffer is added for the non-mru mode. This would keep the order buffer order the same as :buffers and then built-in commands like :bn / :bp in addition to other plugins will continue to work as expected.

This issue is reproduced as follows:

  1. Use a quickfix command (:grep string -R *)
  2. Open the first and third file from quickfix.
  3. Open the second file from quickfix.

The buffers are now listed as: 1,3,2

@weynhamz
Copy link
Owner

@saamalik Interesting problem, I got the problem as you described with your procedure, it seems that the buffers had already been opened after quickfix command, MBE just display them in the order they were activated. I think there is no need for an option, just need to sort the buffer list after a new buffer being added, it should be a default behavior. Will do it soon.

@weynhamz weynhamz reopened this Jun 19, 2013
@weynhamz
Copy link
Owner

@saamalik Should be fixed now, please give it a try.

@saamalik
Copy link

@techlivezheng just tested--looks great! Thanks.

athom pushed a commit to athom/vim-plugin-minibufexpl that referenced this issue Sep 19, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants