Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin does not work correctly with max scrolloff set #9

Closed
ghost opened this issue Mar 9, 2021 · 2 comments
Closed

Plugin does not work correctly with max scrolloff set #9

ghost opened this issue Mar 9, 2021 · 2 comments

Comments

@ghost
Copy link

ghost commented Mar 9, 2021

I've been using a high scrolloff setting pretty much since I began using vim and have done the same thing in kakoune with set-option global scrolloff 99,3 # Center cursor and it works great for my needs so I always know where my main cursor/selection is. I had never heard of these smooth scroll plugins for vim and thought the idea was cool when I came across this one but, unfortunately, it doesn't seem to work in this "auto-center" mode that I use, if you want to call it that.

I disabled that one line after the plugin didn't work when I installed it and then it worked fine and now it has stopped working when I uncommented the scrolloff line again.

Are you using Kakoune on your local computer or through a remote interface (SSH, RDP etc)?

I am using it locally.

Is scrolling smooth otherwise and only hangs up like this occasionally, or is there general choppiness?

It works perfectly fine without the scrolloff setting enabled.

Are you using the latest master?

I have installed it with plug.kak
plug "caksoylar/kakoune-smooth-scroll"
I'm just manually enabling it with smooth-scroll-enable so I don't have the WinCreate hook in the config section right now.

Do you see any errors or warning messages in the debug buffer?

There are no errors when loading it and just some highlighting false positives if I manually source it.

@caksoylar
Copy link
Owner

Thanks for the detailed report. I have done some testing with large scrolloff values and indeed it either scroll smoothly or moves to the wrong line (depending on whether page-based movements like <c-u> or others are used, since they work with slightly different mechanisms).

The fundamental issue seems to be that depending on the window height and cursor position, vj and j, or vk and k doesn't always scroll a single line in this large scrolloff mode. In some cases it doesn't move at all, in some cases it moves by two lines. Since we have to use vjj and vkk to smoothly scroll down and up respectively, I can't see a way out of this right now.

Sorry about that, you obviously spent time testing it. For now, I'll add a note to the README noting that it won't work with large scrolloff values.

@ghost
Copy link
Author

ghost commented Mar 9, 2021

Alright thanks for your quick resposne. Thankfully it's not a deal-breaker for me as high scrolloff values help me know where I am in a document anyway but glad you can add it as a caveat.

@ghost ghost closed this as completed Mar 9, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant