mirror of
https://github.com/folke/snacks.nvim
synced 2025-08-07 04:08:25 +00:00
fix(scroll): don't animate scroll distance 1
This commit is contained in:
parent
8a98e92dc5
commit
a986851a74
1 changed files with 1 additions and 1 deletions
|
@ -189,7 +189,7 @@ function M.check(win)
|
||||||
-- if delta is 0, then we're animating.
|
-- if delta is 0, then we're animating.
|
||||||
-- also skip if the difference is less than the mousescroll value,
|
-- also skip if the difference is less than the mousescroll value,
|
||||||
-- since most terminals support smooth mouse scrolling.
|
-- since most terminals support smooth mouse scrolling.
|
||||||
if state.view.topline == state.current.topline then
|
if math.abs(state.view.topline - state.current.topline) <= 1 then
|
||||||
stats.skipped = stats.skipped + 1
|
stats.skipped = stats.skipped + 1
|
||||||
state.current = vim.deepcopy(state.view)
|
state.current = vim.deepcopy(state.view)
|
||||||
return
|
return
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue