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

swiper.el (swiper--isearch-function): Change. #2154

Merged
merged 1 commit into from Jul 21, 2019
Merged

Conversation

leungbk
Copy link
Contributor

@leungbk leungbk commented Jul 21, 2019

This PR is to make the behavior of reverse searches closer to that of isearch-backward-regexp.

Having point before the last "o" in "dodo", as in "dod|o", should hop
to the beginning of the string upon entering "do" as the regexp. This
is because when searching backward, the (match-end) of the match to
which we hop should not cross the starting point of the search. When
changing the search string from "do" to "do?", we hop back to the
second occurrence of "do", since "do?" can match the second "d" taken
in isolation.

Having point before the last "o" in "dodo", as in "dod|o", should hop
to the beginning of the string upon entering "do" as the regexp.  This
is because when searching backward, the (match-end) of the match to
which we hop should not cross the starting point of the search.  When
changing the search string from "do" to "do?", we hop back to the
second occurrence of "do", since "do?" can match the second "d" taken
in isolation.
@abo-abo abo-abo merged commit 2a036b8 into abo-abo:master Jul 21, 2019
1 check passed
@abo-abo
Copy link
Owner

@abo-abo abo-abo commented Jul 21, 2019

Thanks. Well done!

@leungbk leungbk deleted the reverse branch Jul 22, 2019
astoff pushed a commit to astoff/swiper that referenced this issue Jan 1, 2021
astoff pushed a commit to astoff/swiper that referenced this issue Jan 1, 2021
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

Successfully merging this pull request may close these issues.

None yet

2 participants