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

Fix swiper jumping incorrectly to the first match #1791

Closed
wants to merge 1 commit into from

Conversation

@gucong
Copy link

commented Oct 26, 2018

To reproduce the problem:

  1. have a file with content
aaa
bbb
ccc
aaa
  1. go to third line ccc
  2. M-x swiper
  3. type in a one at a time and observe selection to jump to the first line after typing the second a.

The expected behavior would be to stay at the fourth line, instead of jumping to the first.

When I work with some large files, swiper sometimes jump to thousands of lines above (which have identical content), when I only want to search in the vicinity.

My quick fix is to modify ivy--recompute-index to ensure calling the designated function in ivy-index-functions-alist at least for the swiper caller. There might be some better handling of the control flow than mine here.

@abo-abo abo-abo closed this in c369298 Oct 26, 2018

@abo-abo

This comment has been minimized.

Copy link
Owner

commented Oct 26, 2018

I was able to reproduce the bug and your fix. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.