mirror of
https://github.com/folke/snacks.nvim
synced 2025-08-04 10:49:08 +00:00
fix(scroll): only animate the current window when scrollbind is active
This commit is contained in:
parent
51f95693ae
commit
c9880ce872
1 changed files with 5 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue