romgrk / barbar.nvim

The neovim tabline plugin.
2.16k stars 81 forks source link

Separators missing after opening sidebar #560

Closed nottyl closed 3 months ago

nottyl commented 3 months ago

Description

When I open and close the sidebar (e.g. Undotree, NvimTree), the leftmost separator gets replaced with "<". I don't know if this is a bug, or if I had configured it incorrectly.

To Reproduce

init.lua:

  {
    "romgrk/barbar.nvim",
    dependencies = "nvim-web-devicons",
    init = function()
      vim.g.barbar_auto_setup = false
    end,
    version = "^1.0.0",
  },

barbar.lua:

require("barbar").setup {
  custom_colors = true,
  animation = true,
  tabpages = false,
  auto_hide = true,
  clickable = true,
  sidebar_filetypes = {
    NvimTree = { text = "Everything Bagel", align = "center" },
    UndoTree = { text = "UndoTree" },
  },
  preset = "default",
  no_name_title = nil,
  separator = {left = '▎', right = ''},
}

Steps to reproduce the behavior:

  1. Start up your neovim and load a file
  2. Open and close the sidebar (e.g. Undotree)
  3. See error

Screenshots Before opening the sidebar:

Screenshot

After opening and closing the sidebar:

Screenshot

Informations NVIM v0.9.5 Build type: Release LuaJIT 2.1.1710088188

Iron-E commented 3 months ago

I can reproduce


Edit

Looks like there is an extra space appearing from somehere:

%#BufferCurrentSign#%#BufferCurrent#                          %#DevIconDefaultCurrent# %#BufferCurrent#a%#BufferCurrent#                          %#BufferCurrent#%#BufferCurrentSignRight#%#BufferInactiveSign#%#BufferInactive#                          %#BufferInactive# %#BufferInactive#b%#BufferInactive#                          %#BufferInactive#%#BufferInactiveSignRight#%#BufferInactiveSign#%#BufferInactive#                          %#BufferInactive# %#BufferInactive#c%#BufferInactive#                          %#BufferInactive#%#BufferInactiveSignRight#%#BufferTabpageFill#   %#BufferTabpageFill#
%#BufferCurrentSign#%#BufferCurrent#                          %#DevIconDefaultCurrent# %#BufferCurrent#a%#BufferCurrent#                          %#BufferCurrent#%#BufferCurrentSignRight#%#BufferInactiveSign#%#BufferInactive#                          %#BufferInactive# %#BufferInactive#b%#BufferInactive#                          %#BufferInactive#%#BufferInactiveSignRight#%#BufferInactiveSign#%#BufferInactive#                          %#BufferInactive# %#BufferInactive#c%#BufferInactive#                          %#BufferInactive#%#BufferInactiveSignRight#%#BufferTabpageFill#    %#BufferTabpageFill#