Skip to content

Commit

Permalink
Fix subline position term in velocity formula
Browse files Browse the repository at this point in the history
The subline potion was previously added with incorrect sign (should be
negated instead). This might be partially responsible for animation
speed quirks described in
#22 (comment)
  • Loading branch information
psliwka committed Jan 17, 2021
1 parent 0c1696a commit 6cd5dea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion autoload/smoothie.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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

""
Expand Down

0 comments on commit 6cd5dea

Please sign in to comment.