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

Disable during incsearch. #11

Open
jordwalke opened this issue Apr 30, 2016 · 1 comment
Open

Disable during incsearch. #11

jordwalke opened this issue Apr 30, 2016 · 1 comment

Comments

@jordwalke
Copy link

jordwalke commented Apr 30, 2016

This is a wonderful plugin, but unfortunately it cannot be used with incsearch as it is too distracting. It's not that it doesn't work with incsearch - rather, it causes buggy movement when incsearch is enabled. When typing /something, incsearch finds the correct location as you type, but then when you hit enter, the animation occurs from the previous location instead of the screen remaining where incsearch brought you to.

@joeytwiddle
Copy link
Owner

joeytwiddle commented May 12, 2016

I am aware of this issue (although I have become accustomed to the weird behaviour).

CursorMoved events do not fire while performing an incremental search, so the plugin is not aware that the cursor has moved until after the searching is over, and so the animation only happens after leaving the search.

Possible solutions would be to:

  1. remap / and ? to temporarily disable smooth scrolling,
  2. or replace them with a scripted searching mechanism that could perform smooth scrolling while doing incremental search.

I guess I should do 1 to at least hide the bug. 2 would be a bit heavy for this "lightweight" script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants