fix(scroll): don't animate when recording or executing macros

This commit is contained in:
Folke Lemaitre 2025-01-06 16:54:37 +01:00
parent ee08b1f32e
commit 7dcdcb0b6a
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040

View file

@ -49,6 +49,9 @@ local spammer_timer = assert((vim.uv or vim.loop).new_timer())
-- get the state for a window.
-- when the state doesn't exist, its target is the current view
local function get_state(win)
if vim.o.paste or vim.fn.reg_executing() ~= "" or vim.fn.reg_recording() ~= "" then
return
end
if not vim.api.nvim_win_is_valid(win) then
return
end