romgrk / barbar.nvim

The neovim tabline plugin.
2.17k stars 82 forks source link

Barbar blinks when switching windows #464

Closed otavioschwanck closed 1 year ago

otavioschwanck commented 1 year ago

blink_barbar

Iron-E commented 1 year ago

What are you using to switch windows? I can't reproduce with <C-w>l or :wincmd.

If you use something like vim-win it will "blink", because focus is being taken away from the current buffer. In that case, it isn't a bug with barbar, it's just a side effect of the method being used to switch windows.

otavioschwanck commented 1 year ago

What are you using to switch windows? I can't reproduce with <C-w>l or :wincmd.

If you use something like vim-win it will "blink", because focus is being taken away from the current buffer. In that case, it isn't a bug with barbar, it's just a side effect of the method being used to switch windows.

set('n', ',', 'W') set('n', ';', 'w')

Iron-E commented 1 year ago

I'm confused— w and W only jump between words. Have they been rebound elsewhere?

otavioschwanck commented 1 year ago

I'm confused— w and W only jump between words. Have they been rebound elsewhere?


  set('n', ',', '<C-w>W')
  set('n', ';', '<C-w>w')

GH messed XD

Iron-E commented 1 year ago

I tried using a minimal config:

nvim --clean -u minimal.lua
vim.opt.rtp:append {
  '~/.local/share/nvim/lazy/barbar.nvim',
  '~/.local/share/nvim/lazy/nvim-web-devicons',
}

require'barbar'.setup {}

vim.keymap.set('n', ',', '<C-w>W')
vim.keymap.set('n', ';', '<C-w>w')

But I couldn't reproduce. Does it still happen when using the minimal config?

otavioschwanck commented 1 year ago
```shell
nvim --clean -u minimal.lua

the minimal doesn't blink, maybe is something with my config

Iron-E commented 1 year ago

If it doesn't happen with nvim --clean, it could be something in your config (but it also could still be a bug with barbar).

The only real way to tell is to make a minimal configuration where the blinking happens; speaking from experience it can be a bit of a pain 😬

otavioschwanck commented 1 year ago

If it doesn't happen with nvim --clean, it could be something in your config (but it also could still be a bug with barbar).

The only real way to tell is to make a minimal configuration where the blinking happens; speaking from experience it can be a bit of a pain 😬

1 - i did some tests here. The more tabs are open, the more the blink time. 2 - disabling the animations fix the problem.

i think there is some performance problem with animations + bar redraw. I will keep the issue for the future but i will just use with the animations off.

Iron-E commented 1 year ago

I will keep the issue for the future but i will just use with the animations off.

Sounds good. I personally disable animations myself just to keep things minimal, but it's a shame that you had to make that choice because of a bug.

If you (or anyone who finds this issue) are able to get a minimal reproduction, I'll be happy to investigate further.

otavioschwanck commented 1 year ago

I will keep the issue for the future but i will just use with the animations off.

Sounds good. I personally disable animations myself just to keep things minimal, but it's a shame that you had to make that choice because of a bug.

If you (or anyone who finds this issue) are able to get a minimal reproduction, I'll be happy to investigate further.

I Found the problem, is the plugin rainbowhxch/beacon.nvim on my config.

it makes the tab also blink

Iron-E commented 1 year ago

Does it happen with specs.nvim or SmoothCursor.nvim? They seem more actively updated

otavioschwanck commented 1 year ago

It only with beacon, closing the issue!