akinsho / bufferline.nvim

A snazzy bufferline for Neovim
GNU General Public License v3.0
3.55k stars 198 forks source link

[Bug]: Recent neovim builds show a grey gap between the active tab marker and the active tab itself #975

Open danpascu opened 1 month ago

danpascu commented 1 month ago

Is there an existing issue for this?

What happened?

I recently rebuilt neovim with a newer version to address some issue I had with another plugin. Before I was running NVIM v0.11.0-dev-359+g5b778a64e and the new version is NVIM v0.11.0-dev-1062+g8f9401f5c8.

When I started the new version I noticed the tabs looked different and were showing a differently colored gap between the active tab marker and the active tab itself.

Before updating neovim (NVIM v0.11.0-dev-359+g5b778a64e) it looked like this: bufferline-good

while with the newer neovim (NVIM v0.11.0-dev-1062+g8f9401f5c8) looked like this: bufferline-bad

This happens with the tokyonight theme, but it doesn't happen with catppuccin so it seems to be theme dependant (tokyonight is not the only theme affected, I noticed differently colored gaps and color artifacts with other themes as well).

I ran bisect on the neovim repository and I found the commit that triggered the problem:

~/work/neovim.test$ git bisect bad
e049c6e4c08a141c94218672e770f86f91c27a11 is the first bad commit
commit e049c6e4c08a141c94218672e770f86f91c27a11
Author: Riley Bruins <ribru17@hotmail.com>
Date:   Sat Oct 12 10:57:31 2024 -0700

    feat(ui): statusline text inherits highlights #29976

    Changes apply to the winbar, statusline, and tabline text.

 runtime/doc/news.txt                   |  4 ++++
 src/nvim/statusline.c                  |  2 +-
 test/functional/ui/highlight_spec.lua  | 13 +++++++------
 test/functional/ui/multibyte_spec.lua  | 20 ++++++++++++++++++--
 test/functional/ui/statusline_spec.lua |  3 ++-
 test/functional/ui/tabline_spec.lua    | 20 ++++++++++++++++++++
 test/functional/ui/winbar_spec.lua     | 22 ++++++++++++++++++++++
 7 files changed, 74 insertions(+), 10 deletions(-)

I am unsure if this issue is with bufferline or the themes being affected by the recent neovim change, so I apologize in advance if I filed this in the wrong place.

What did you expect to happen?

I expected it to display the tabs as before. I did not expect that gap to show up there.

Config

I did not modify any settings for bufferline. I'm running LazyVim with its default settings for bufferline.

This is what I found within LazyVim for configuring bufferline:

  {
    "akinsho/bufferline.nvim",
    opts = {
      options = {
        -- stylua: ignore
        close_command = function(n) LazyVim.ui.bufremove(n) end,
        -- stylua: ignore
        right_mouse_command = function(n) LazyVim.ui.bufremove(n) end,
        diagnostics = "nvim_lsp",
        always_show_bufferline = false,
        diagnostics_indicator = function(_, _, diag)
          local icons = LazyVim.config.icons.diagnostics
          local ret = (diag.error and icons.Error .. diag.error .. " " or "")
            .. (diag.warning and icons.Warn .. diag.warning or "")
          return vim.trim(ret)
        end,
        offsets = {
          {
            filetype = "neo-tree",
            text = "Neo-tree",
            highlight = "Directory",
            text_align = "left",
          },
        },
        ---@param opts bufferline.IconFetcherOpts
        get_element_icon = function(opts)
          return LazyVim.config.icons.ft[opts.filetype]
        end,
      },
    },
    config = function(_, opts)
      require("bufferline").setup(opts)
      -- Fix bufferline when restoring a session
      vim.api.nvim_create_autocmd({ "BufAdd", "BufDelete" }, {
        callback = function()
          vim.schedule(function()
            pcall(nvim_bufferline)
          end)
        end,
      })
    end,
  },

Additional Information

...

commit

It was not a bufferline commit that triggered this, but a neovim commit about 2 weeks ago. See the description above.

akinsho commented 4 weeks ago

@danpascu I don't really actively support nightly neovim as I don't have the time to track all the changes that get made, my approach is to wait till these changes are confirmed and stable and released and then address any issues once what you describe might be reverted or changed further and I can't keep up up with nightly

danpascu commented 4 weeks ago

That's fair. Feel free to close it or leave it open and look at it later if still relevant.