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
Steps to reproduce, using ivy-switch-buffer to switch buffers:
Open two buffers with a common prefix. In my case, todo.org and todo.org_archive.
Switch to todo.org.
Switch to some third buffer, like *Messages*.
Switch to some fourth buffer, like *scratch*.
Start typing your common prefix from step 1, e.g. todo.
Expected behavior: todo.org is first in Ivy's candidates list and is selected, since that was the most recent buffer with that string.
Observed behavior: todo.org is first in Ivy's candidates, but todo.org_archive is the second and is the selected option, presumably because ivy-switch-buffer starts with the "other" buffer selected by default, which (AFAIK) is always the second option.
Is there any way to get ivy-switch-buffer to select the most recent non-current buffer after filtering? I believe this behavior changed as of 79ffa67 (#484). Thanks!
The text was updated successfully, but these errors were encountered:
In an effort to scratch my own itch here, I've replaced use of ivy--old-cands in ivy--recompute-index with ivy--current. That bit of code seems to exist to keep the current candidate selected if it's still a candidate, but ivy--old-cands is now updated before ivy--recompute-index is called, so that (nth) form no longer returns the current candidate, potentially. Or, at least, that's my hypothesis based on my very limited understanding of ivy.el.
So far it seems good but I'm going to run with this for a while to see if this fixes my issue without breaking anything else.