mirror of
https://github.com/folke/snacks.nvim
synced 2025-08-04 02:38:46 +00:00
fix(scroll): better toggle
This commit is contained in:
parent
14dcb0e6cf
commit
3dcaad8d0a
2 changed files with 31 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue