romgrk / barbar.nvim

The neovim tabline plugin.
2.23k stars 83 forks source link

tabNext tabPrevious not working in the expected order #362

Closed benlieb closed 1 year ago

benlieb commented 1 year ago

When barbar is installed my tab movement is not linear. I'm not sure what order it goes in, perhaps the open order. I haven't figured it out, but it's a dealbreaker for me. I navigate tabs all day long.

Iron-E commented 1 year ago

I can't seem to reproduce. If I run nvim -p a b c d, and then run :tabn and/or :tabp, the tabs maneuver in the order provided by Neovim (i.e. tabpagenr()).

Can you post a minimal init file (such that nvim --clean -u <file>) produces the behavior you're experiencing?

benlieb commented 1 year ago

When I use -p , and with :tabe it works as expected, but when I open a tab with NERDtree or Fuzzy finder it gets weird.

Also when sometimes I quit a tab, and it stays visible, but the tabn will skip it. I suspect this is a buffer issue. I can't make heads or tails of whats going on here.

Iron-E commented 1 year ago

when I open a tab with NERDtree or Fuzzy finder it gets weird.

Can you be more specific, or upload a video? Does disabling barbar.nvim stop this issue?

Also when sometimes I quit a tab, and it stays visible, but the :tabn will skip it.

That's because when you create a new tab, Neovim fills it with an empty buffer. When you close the tab, that buffer doesn't go away (unless you :e a file in that tab before closing it). barbar.nvim is just showing you that the buffer still exists (you can verify this by doing :ls!, which shows all buffers, even hidden and unnamed ones)


It sounds like NERDtree might not be properly closing the temporary buffer that opens when a tab is created. Does this happen with nvim-tree too?

romgrk commented 1 year ago

Let's close until we have more feedback, feel free to reopen with more details.