Avoid to wipe a user buffer when writing candidates. #1837
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Fix #1772.
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
with-current-buffer
block).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?