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

[Bug]: sort_by = 'insert_after_current' stops working after calling :BufferLineMoveNext #706

Closed
1 task done
durka opened this issue Mar 11, 2023 · 2 comments
Closed
1 task done
Labels
bug Something isn't working

Comments

@durka
Copy link

durka commented Mar 11, 2023

Is there an existing issue for this?

  • I have searched the existing issues

What happened?

After using :BufferLineMoveNext or :BufferLineMovePrev, new buffers always show up at the end of the bufferline.

What did you expect to happen?

I thought that new buffers would continue to open just to the right of the current one.

Config

            require("bufferline").setup {
                options = {
                    right_mouse_command = '',
                    middle_mouse_command = 'bdelete! %d',
                    separator_style = 'slant',
                    sort_by = 'insert_after_current',
                    hover = {
                        enabled = true,
                        delay = 5,
                        reveal = {'close'}
                    },
                }
            }

Additional Information

nvim v0.8.3

commit

No response

@durka durka added the bug Something isn't working label Mar 11, 2023
@akinsho
Copy link
Owner

akinsho commented Mar 11, 2023

@durka this is not a bug but by design, if you move the buffers yourself you are essentially taking control of the sorting of the bufferline. So bufferline stops using its mechanism and differs to you because maintaining its sort order as well as yours is complicated and messy. I don't intend to change this but PRs welcome if you know how

@akinsho akinsho closed this as completed Mar 11, 2023
@durka
Copy link
Author

durka commented Mar 11, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants