Avoid to wipe a user buffer when writing candidates. #1837
I was able to reproduce the issue with counsel-ag, and I suspect that the bug impacts any usage of counsel--async-command as well.
My guess is that counsel--async-filter is a caller of ivy--insert-minibuffer, which must only be called when the current buffer is the minibuffer (ie, ivy--insert-minibuffer is not wrapped in a
When called with a process that exists immediately, it is very unlikely that the process filter will be called at all, and even less before the user had time to change buffer himself.
@jojojames can you confirm that this version fixes the issue?