Open nonetrix opened 5 months ago
Note: I am on 165Hz monitor, perhaps it sends mouse events quicker or something? Just a guess
Potentially related: #550
Luckily doesn't seem to cause many issues, is there way to suppress these errors until a fix?
Not a clean one 😅
I'll try to take a look at this soon.
Took a quick look at this, just reporting my findings so far (side note: I actually use nix
myself, so I was able to drop your config right into mine without hassle!)
I was able to reproduce the issue right away with the config
Edit: I created a minimal repro that works with my config too
--[[ minimal.lua ]]
local lazy = vim.fn.stdpath('data') .. '/lazy/'
vim.opt.rtp:prepend {
lazy .. 'barbar.nvim',
lazy .. 'nvim-web-devicons',
}
vim.g.barbar_auto_setup = false
require('barbar').setup {
-- additional options
}
-- additional code
vim.api.nvim_create_autocmd('VimEnter', {
callback = vim.schedule_wrap(function()
-- additional post-startup code
vim.cmd [[
for file in ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "x", "y", "z"]
execute "edit " .. file
endfor
]]
end),
})
@nonetrix for now setting animate = false
in your barbar config should fix it. I'll let you know when we have a real fix
I set up some debug logging to inspect this further, and captured the following state here:
{
current_animation = {
current = 0,
duration = 150,
final = 1,
fn = <function 1>,
initial = 0,
running = true,
start = 6703368.801163,
timer = <userdata 1>,
type = 5
},
current_data = {
closing = false,
computed_position = 0,
computed_width = 12,
diagnostics = { 0, 0, 0, 0 },
gitsigns = {
added = 0,
changed = 0,
deleted = 0
},
moving = false,
name = "a",
pinned = false,
will_close = false
},
current_number = 1,
move_animation_data = {},
ratio = 0.93393590000148
}
This leads me to believe that the problem is manifesting here, as the move_animation_data
is empty (which causes the arithmetic error we see in lerp
).
It seems move_animation_data
is set just before move_buffer_animated_tick
is called right here, which means previous_positions
and next_positions
must also be nil
by this point
Description
When quickly moving tabs you will get a lot of errors randomly, I assume I could just turn these off and ignore them automatically somehow. However, this seems like plugin itself has a bug that causes this in the first place and it should be fixed at the root. Here is a example of one I got quickly dragging tabs with mouse on Kitty
To Reproduce
init.vim:
It's in Nix sorry :(
Steps to reproduce the behavior:
Screenshots
Informations (note information is misspelled here in the template, small mistake but I noticed. Best of luck no harm meant:-) ) Neovim version: v0.10.0