fix(scroll): only animate the current window when scrollbind is active

This commit is contained in:
Folke Lemaitre 2024-12-10 20:34:06 +01:00
parent 51f95693ae
commit c9880ce872
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040

View file

@ -135,6 +135,11 @@ local function update(state, changes)
return
end
-- only animate the current window when scrollbind is enabled
if vim.wo[state.win].scrollbind and vim.api.nvim_get_current_win() ~= state.win then
return
end
if changes then
state.current = vim.tbl_extend("force", state.current, changes)
end