New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ivy-Occur buffer created incorrectly from a restricted search #2721
Comments
This seems to be a more fundamental and systemic problem than I had originally realized, as it appears to affect a number of other counsel commands too. I tried this out with
|
I just noticed that this is likely a duplicate of #2427. |
I performed some additional investigation into this issue today. It appears that the restricted results that are in the minibuffer are not actually used to create the occur buffer. Instead, It appears the reason these results are being recreated rather than just passed from the minibuffer directly to the occur buffer, is to support refreshing the occur buffer after changes may have been made to the corresponding buffers (via However, it appears that |
I'm expecting that I can perform the same kind of narrowing when using the git-grep search mechanism via the
counsel-git-grep
search. The narrowing seems to work fine and I end up with a restricted set of matches, but when I attempt to send the results to an ivy-occur buffer, the contents of the buffer do not match the final search results due to the narrowing.Steps to reproduce:
make plain
commandC-x C-f ~/git/swiper/ivy.el
C-c j
S-SPC
C-c C-o
The created
*ivy-occur*
buffer has 4807 candidates (not 240 candidates as was shown in the candidates list). The 4807 candidates is the same number and set of results as if only a git-grep search for "ivy" had been done without the previous narrowing due to the "swiper" search string.The following screenshots cover steps 4, 6 and 7 as identified above.
Example showing the search results for "swiper" (step 4)
Example showing the restricted search results for "ivy" (step 6)
Example showing the occur buffer generated from the restricted search results (step 7)
The text was updated successfully, but these errors were encountered: