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
counsel-git-grep highlights matches in filenames #483
Comments
Thanks. |
Thanks for speedy fix but it seems rather specific. Does it work for anything else? Rather than checking if the caller was counsel-git-grep could there be an optional argument that could be passed in with a regexp or a function defining which part of the line to highlight? |
I don't want to be changing the arglists too much, checking |
and It seems wrong to have a check for a counsel-level command in ivy.el, but I see it's not the only one. |
Add "counsel-ag counsel-pt" to the special highlight behavior. Re #483
I'll think about adding an API for this at some point. But I'm not sure anyone would want to deal with the logic: you have to pretty much replace On the other hand, it's just a str->str mapping, not rocket science. And helm has as similar API for this, if I recall correctly. |
counsel-git-grep
lists matching lines prefixed with the filename and line number (as it should). It also highlights the matching strings in the lines shown (I believe viaivy--format-minibuffer-line
). However it might also highlight part of the filename if it matches the regexp. I don't think it should highlight the filename (or line number) part of the line because that wasn't why the line is considered to match the regexp.I assume similar functions such as
counsel-ag
andcounsel-pt
have the same problem.This came from my work in #395 but I never came up with a good solution.
The text was updated successfully, but these errors were encountered: