Skip to content

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

Closed

Description

@durka

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

Activity

  1. added
    bug
    on Mar 11, 2023
  2. akinsho commented on Mar 11, 2023

    @akinsho
    Owner

    @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

  3. durka commented on Mar 11, 2023

    @durka
    Author
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions