consult-focus-lines highlighting just like consult-keep-lines does it #1257
Replies: 3 comments 5 replies
-
This is not a good idea since it will make consult-focus-lines much less efficient and the lines won't be editable anymore. consult-focus-lines puts an overlay over the hidden lines only (thus no highlighting) while consult-keep-lines |
Beta Was this translation helpful? Give feedback.
-
But why isn't efficiency/editability a problem for |
Beta Was this translation helpful? Give feedback.
-
Yeah, by minor cosmetic change, I just meant what the user perceives. Code-wise, it might be a larger change. Consult could have a backend function (for both focus/keep function), which can do the preview step. It could have a boolean argument how to behave (highlight or not). After this backend function returns, it'd leave the buffer in a "marked state". And then (this approach also has the benefit that the behavior could depend on the size of the buffer: if the buffer is small, we can do the highlighting. If it is large, then use the more efficient solution.) I may try to implement this refactoring if it is not very hard to do (if you're open to this idea). |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
This is a little cosmetic suggestion: when using
consult-keep-lines
, during preview, consult nicely highlights the matching part of the lines, whileconsult-focus-lines
doesn't.(I tried to fix it by passing
'highlight
toconsult--completion-filter-dispatch
(instead ofnil
), but it doesn't work.)Beta Was this translation helpful? Give feedback.
All reactions