-
Notifications
You must be signed in to change notification settings - Fork 16
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
Add max_threshold setting #62
Conversation
Thank you for your PR! Nice idea! However, I think it shouldn't be like that. According to #11, if SmoothCursor jumps a large chunk, the cursor will skip to within a one-page range. I ran some tests with files of 200, 1000, 10000 lines. The test was just to open and press Can you provide more details about the situation where the slowdown occurred? |
Yes, so I'm specifically talking about my kitty.conf file. I do use folds, so when I open it, I pretty much only see a few folds and already the end of the file. When jumping to the end of it, it's very slow. So my assumption is, since "everything" is in the visible viewport, SmoothCursor will go through everything, including the folded lines? While |
I agree with this. Can you set default value to |
All right the default value is set to I noticed that I actually did not implement this correctly! I fixed it now, now it should work as expected. I have no idea why it worked previously, as I have really tested it, but heh - at least it seems to be working now :D |
LGTM! |
There might be some difficulties in detecting folded lines and skipping them. Though it should be, I'm not keen on implementing it (as I rarely use folding text). |
I noticed quite some slowdown when dealing with large files and quickly jumping to the end (G) or the beginning (gg). I figured this was SmoothCursor.nvim's fault.
I added a setting to set a max threshold. If you move more than this amount of lines, there will be no animation. Tried it out in practice, after that there was no more slowdown anymore ^^