From 6cd5dea1698c0238a6d08eb8fc66696007483640 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20=C5=9Aliwka?= Date: Sun, 17 Jan 2021 16:33:46 +0100 Subject: [PATCH] Fix subline position term in velocity formula The subline potion was previously added with incorrect sign (should be negated instead). This might be partially responsible for animation speed quirks described in https://github.com/psliwka/vim-smoothie/issues/22#issuecomment-751296807 --- autoload/smoothie.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/smoothie.vim b/autoload/smoothie.vim index b61904f..73e0b0d 100644 --- a/autoload/smoothie.vim +++ b/autoload/smoothie.vim @@ -183,7 +183,7 @@ endfunction " TODO: current algorithm is rather crude, would be good to research better " alternatives. function s:compute_velocity() - return g:smoothie_base_speed * (s:target_displacement + s:subline_position) + return g:smoothie_base_speed * (s:target_displacement - s:subline_position) endfunction ""