psliwka / vim-smoothie

Smooth scrolling for Vim done rightšŸ„¤
MIT License
988 stars 27 forks source link

New easing curve too slow to stop #27

Closed oblitum closed 2 years ago

oblitum commented 3 years ago

Hi, not sure whether it fits feature request or bug, but for me, the new animation is a bit slow at the end to stop. Could it be made so that by default there's a nice easing curve but not so slow motion at the end?

blmatthews commented 3 years ago

I agree, I much preferred the version I had before I updated a few days ago (unfortunately I don't know what that was). I've been using the latest version for a few days and so far can't get used to it, as soon as it starts slowing I think it's done and start doing things, which then get done to the wrong text when it scrolls a few more lines.

Edit: I restored the previous version I was using from backup and it looks like it was a0414d1, and I much prefer its behavior to the current behavior. I do see there are some variables controlling current behavior, and I got it closer to the previous behavior setting g:smoothie_speed_exponentiation_factor = 1.1, although it still wasn't quite as nice, and the comment says not to do that, so maybe that breaks something else that I didn't notice.

psliwka commented 3 years ago

Oh, hi @oblitum! Nice to see caps2esc author here ;)

Thanks for bisecting this, @blmatthews. I'm surprised you had to set g:smoothie_speed_exponentiation_factor to 1.1. Setting this to just 1.0 should be enough to cancel out recent changes to the deceleration curve. There was, however, one more bug fixed recently, which actually caused the cursor to speed up a little just before reaching its target position. I am wondering whether this could be desired behavior in your eyes. Could you please compare how does 0c1696a9b3b8db8cdb567a5fe8b9d6d27e118c0b and 6cd5dea1698c0238a6d08eb8fc66696007483640 work for you?

psliwka commented 3 years ago

^ Reopening due to being closed mistakenly with a poorly-worded commit message.

psliwka commented 2 years ago

I've identified a potential bug in Vim's timer handling which could have caused this, and pushed a fix for it in f2aaab110b49da21ab7abf4858173e3194109f6a. @oblitum, @blmatthews, could you please re-test if this fixes the issue for you?

psliwka commented 2 years ago

Marking as resolved. Feel free to open another issue in case the problem persists.