branch: externals/consult
commit 9481fe9a249b4b35ca861b4f89d68fecafd46b25
Author: Daniel Mendler <[email protected]>
Commit: Daniel Mendler <[email protected]>
Fix consult--man-builder to use consult--regexp-compiler
cc @astoff
---
consult.el | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/consult.el b/consult.el
index 369ce8716e..ded37380c9 100644
--- a/consult.el
+++ b/consult.el
@@ -4881,11 +4881,13 @@ details regarding the asynchronous search."
(defun consult--man-builder (input)
"Build command line given CONFIG and INPUT."
- (pcase-let ((`(,arg . ,opts) (consult--command-split input)))
- (unless (string-blank-p arg)
+ (pcase-let* ((`(,arg . ,opts) (consult--command-split input))
+ (`(,re . ,hl) (funcall consult--regexp-compiler arg 'basic t)))
+ (when re
(list :command (append (consult--build-args consult-man-args)
- (list arg) opts)
- :highlight (cdr (consult--default-regexp-compiler input 'basic
t))))))
+ (list (consult--join-regexps re 'basic))
+ opts)
+ :highlight hl))))
(defun consult--man-format (lines)
"Format man candidates from LINES."