psliwka / vim-smoothie

Smooth scrolling for Vim done right🥤
MIT License
988 stars 27 forks source link

Infinite loop with context.vim #45

Open GuillaumeDeconinck opened 2 years ago

GuillaumeDeconinck commented 2 years ago

Hello,

First thank you for this plugin, it really is pleasant to have good smooth scrolling in (neo)vim :)

I have a small issue when using vim-smoothie with context.vim (plugin for showing the current context, like the function name & the class if these are out of the screen). I think it's more on vim-smoothie side, because it's where the movements "happen" from what I know, but I apologize in advance if it's not the case.

As a picture is worth a thousand words, here is a small recording of the issue:

Recording ![Recording 2022-08-06 at 19 36 16](https://user-images.githubusercontent.com/8962903/183293595-b4533397-7510-47c7-84ce-4c547361b783.gif)

In summary, when the cursor is on the first line of a file, if I go down with CTRL-D in a file that triggers context-vim (so it adds additional lines for the context), it seems that vim-smoothie is confused about the cursor's position due to these additional lines. This put vim-smoothie (I guess?) in a infinite loop, moving up and down infinitely.

I'm on neovim v0.7.2. I can try to provide a minimal init.vim if needed.

What do you think ?

Thanks !