abo-abo/swiper

`swiper-all` doesn't revert to starting point when cancelled (`C-g`)

gc1o1 opened this issue · 0 comments

gc1o1 commented

The expected behavior

I start swiper or swiper-isearch. I go to another finding in the mini-buffer (with C-n and C-p). I don't press Enter. Instead, I decide to cancel (C-g) the search. I am sent back to the point where I was when I started swiper. That's good, it's the intended behavior. There is explicit code to do that. See variable swiper-stay-on-quit which is described as "When non-nil don't go back to search start on abort.", and it's nil, so, the default behavior is indeed to go back on abort.

The bug

However, this isn't used by swiper-all and swiper-all.
So, if you navigate around in the mini-buffer with C-n and C-p, and (before pressing Enter) you press C-g, you'll be stuck where you last navigated, as if you had pressed Enter to actually go there.