Open Addlai opened 2 years ago
I met the same problem. It's odd that swiper-isearch
's candidates are updated instantly after ivy-toggle-regexp-quote
.
After looking at ivy-toggle-regexp-quote
and ivy-toggle-case-fold
's definition, I have seen that while the former has (setq ivy--old-text "")
, the latter doesn't.
Adding (setq ivy--old-text "")
to the end of ivy-toggle-case-fold
does the job (swiper-isearch
now re-compute candidates immediately afterwards).
While submitting a PR for this is simple, I don't know enough of ivy
's internals: the reason why ivy-toggle-regexp-quote
modifies ivy--old-text
but ivy-toggle-case-fold
doesn't.
If I use the hydra binding C-o, C for ivy-toggle-case-fold in swiper-isearch the highlighting reflects a case-fold search, but the actual matches is not changed, so swiper-isearch continues to visit matches ignoring case.