abo-abo / swiper

Ivy - a generic completion frontend for Emacs, Swiper - isearch with an overview, and more. Oh, man!
https://oremacs.com/swiper/
2.27k stars 337 forks source link

counsel--async-command-1: Immediately update minibuffer after spawning #3030

Open bcc32 opened 7 months ago

bcc32 commented 7 months ago

This fixes an issue in counsel-rg and related commands where, if the user quickly types some string that does not have any grep results, and the search takes a long time, then the candidates list will say "1 more chars" while ripgrep is already running and won't be updated until ripgrep exits.

This change also has the following side-effect, which may or may not be desired: when the user is typing a query string, if the old query string already had some matches, ivy would continue to display them until rg produced results for the new query string. With this change, however, ivy immediately clears the results list when the new rg process is spawned.

Closes #3029