fix(scroll): better toggle

This commit is contained in:
Folke Lemaitre 2024-12-09 20:00:54 +01:00
parent 14dcb0e6cf
commit 3dcaad8d0a
2 changed files with 31 additions and 2 deletions

View file

@ -300,10 +300,14 @@ function M.scroll()
id = "scroll",
name = "Smooth Scroll",
get = function()
return vim.g.snacks_scroll ~= false
return Snacks.scroll.enabled
end,
set = function(state)
vim.g.snacks_scroll = state
if state then
Snacks.scroll.enable()
else
Snacks.scroll.disable()
end
end,
})
end