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

Quitting ivy-reverse-i-search leaves emacs in strange state #1215

Closed
georgek opened this issue Sep 26, 2017 · 6 comments
Closed

Quitting ivy-reverse-i-search leaves emacs in strange state #1215

georgek opened this issue Sep 26, 2017 · 6 comments
Labels

Comments

@georgek
Copy link

@georgek georgek commented Sep 26, 2017

If I do, say, a C-s (for swiper), then a C-r and then a C-g I am left inside a big minibuffer. I then have to quit that with another C-g. The main buffer can also be left in a strange state by swiper with the highlighting etc. I expect the C-g to return me to the swiper search, and another C-g to return everything back to normal.

One of the principles of emacs for me is that pressing a key in error doesn't break anything; you just have to do a C-g or an undo to get back to normal. This breaks that principle.

@abo-abo
Copy link
Owner

@abo-abo abo-abo commented Sep 27, 2017

That's not what I experience: C-s C-r C-g results in me being in swiper's minibuffer, no weird highlights. One more C-g quits swiper.

Please try to reproduce the bug with emacs -Q and detailed steps.

@georgek
Copy link
Author

@georgek georgek commented Oct 6, 2017

Sorry for the delay. I just tried this with emacs -Q.

I have ivy 20170926.915 and counsel 20170911.1121 which were downloaded with package.el. I do the following:

  • emacs -Q,
  • Add the directories containing ivy and counsel to load-path,
  • (require 'ivy),
  • (require 'swiper),
  • M-x swiper, (optionally type anything), and then C-r C-g.

Point is left in a big minibuffer. If I had typed anything it would also leave the highlights in place and stuff.

@CeleritasCelery
Copy link
Contributor

@CeleritasCelery CeleritasCelery commented Feb 8, 2019

I can reproduce this issue as well.

@d125q
Copy link
Contributor

@d125q d125q commented Feb 11, 2019

Can also reproduce. Adding

(lambda () (ivy--reset-state (setq ivy-last old-last)))

to ivy-read's :unwind seems to fix the issue. Alternatively, I don't see why we just don't use ivy-recursive-restore' functionality?

@abo-abo abo-abo closed this in 48c7087 Feb 12, 2019
@abo-abo
Copy link
Owner

@abo-abo abo-abo commented Feb 12, 2019

Thanks, please test.

@CeleritasCelery
Copy link
Contributor

@CeleritasCelery CeleritasCelery commented Feb 12, 2019

Works for me

astoff added a commit to astoff/swiper that referenced this issue Jan 1, 2021
Old behavior was introduced in abo-abo#323. That use case still works fine
now.

Fixes abo-abo#1215
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants