You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ivy-use-selectable-prompt doesn't work when a dynamic collection is empty #1183
When a dynamic collection is empty, one can't select the input field by enabling ivy-use-selectable-prompt.
Also, pressing RET calls the action on the last highlighted item (the item that was being highlighted just before the dynamic collection function returned an empty collection). This is probably related so I figured I'd note it.
@fabacino Sorry, I have to revert your commit: it breaks the smooth redisplay for :dynamic-collection. The minibuffer is blinking rapidly as the user types. We'll have to figure out how to fix this.
@abo-abo Thanks for your feedback. I think the problem is that a value of nil for ivy--all-candidates can mean two different things:
The function (sync or async) has returned no candidates.
We don't know the candidates yet, because an async function is still running.
I made a new fix, basically checking if there is a running counsel process. If there is, an async function is still running and we don't refresh the minibuffer. If there is none, however, we can safely assume that the function has returned an empty set of candidates. In that case, we update the minibuffer.
If you like it, I can PR. The hard-coded process name is not pretty, but there are other references to the counsel package within ivy.el, so I figured it is probably ok.
If you like it, I can PR. The hard-coded process name is not pretty, but there are other references to the counsel package within ivy.el, so I figured it is probably ok.
Sounds good, please PR. We can refactor the hard-coded stuff later if there's a need.
Activity
fabacino commentedon Oct 31, 2017
Could reproduce the issue with
I will take a look at it.
ivy.el (ivy--exhibit): Update prompt even if there are no candidates
abo-abo commentedon Nov 1, 2017
@fabacino Sorry, I have to revert your commit: it breaks the smooth redisplay for
:dynamic-collection. The minibuffer is blinking rapidly as the user types. We'll have to figure out how to fix this.Revert "ivy.el (ivy--exhibit): Update prompt even if there are no can…
ivy.el (ivy--exhibit): Update prompt even if there are no candidates
fabacino commentedon Nov 2, 2017
@abo-abo Thanks for your feedback. I think the problem is that a value of
nilforivy--all-candidatescan mean two different things:I made a new fix, basically checking if there is a running counsel process. If there is, an async function is still running and we don't refresh the minibuffer. If there is none, however, we can safely assume that the function has returned an empty set of candidates. In that case, we update the minibuffer.
fabacino@b7f2700
If you like it, I can PR. The hard-coded process name is not pretty, but there are other references to the counsel package within
ivy.el, so I figured it is probably ok.abo-abo commentedon Nov 2, 2017
Sounds good, please PR. We can refactor the hard-coded stuff later if there's a need.