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-query-replace: unable to replace first match in buffer #144

Closed
zhaojiangbin opened this Issue Jun 16, 2015 · 1 comment

Comments

Projects
None yet
2 participants
@zhaojiangbin

zhaojiangbin commented Jun 16, 2015

To reproduce:

  1. In scratch buffer, enter a few lines of text containing a same word, say "foo".
  2. Call swiper, input "foo" as pattern. Press C-M-< to select the first match.
  3. Press M-q for query-replace.
  4. Enter "bar" as replacement.
  5. Hit RET. Notice the cursor moves to the second match and query-replace starts there, ignoring the first match.

It appears to be caused by that ivy places the cursor at the end of current match in buffer. When query-replace starts, it can only "look forward" for the match to replace. This has the consequence that swiper-query-replace is never able to replace the first match (or the only match) in buffer.

Verified with MELPA version 20150610.638 in Emacs 24.5.

@zhaojiangbin zhaojiangbin changed the title from swiper-query-replace: always starts replacing with the next match to swiper-query-replace: unable to replace first match in buffer Jun 16, 2015

@abo-abo abo-abo closed this in 9df660c Jun 16, 2015

@abo-abo

This comment has been minimized.

Show comment
Hide comment
@abo-abo

abo-abo Jun 16, 2015

Owner

Thanks.

Owner

abo-abo commented Jun 16, 2015

Thanks.

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