-
-
Notifications
You must be signed in to change notification settings - Fork 339
swiper-isearch starts at wrong hit when multiple hits on line #2025
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
Comments
I have included a fix in #2029 |
OK, took me some minutes to figure out the reason why it works the way it does right now: The original logic: (setq swiper--isearch-point-history
(list
(cons "" (point)))) The current logic: (setq swiper--isearch-point-history
(list
(cons "" (if executing-kbd-macro
(point)
(line-beginning-position))))) Suppose we revert to the original logic. Move the point here:
Press C-s M-n to search for symbol-at-point. The point will not stay at the current Maybe a better solution would be to modify only the M-n logic, and keep the original |
Thanks, please test. |
I just started to use
swiper-isearch
and it's very nice. One minor problem I noticed is that when I invokeswiper-isearch
starting on a line containing two occurrences of the search term, swiper initially matches the first occurrence of the match on the line, even if the initial invocation position was to the right of that first occurrence.In my case, I had actually initiated the search from the second occurrence via
swiper-isearch
followed byivy-yank-word
, which made it even more jarring as I went to doivy-yank-word
a second time to further refine the search, but it pulled in the word following the first occurrence on the line, not the one I started from!(In fact it has nothing to do with whether there are multiple occurrences on the line,
swiper-isearch
should just start from the next match if the initial invocation position is to the right of the first match on the line)The text was updated successfully, but these errors were encountered: