Function: consult-narrow
consult-narrow is an interactive and byte-compiled function defined in
consult.el.
Signature
(consult-narrow KEY)
Documentation
Narrow current completion with KEY.
This command is used internally by the narrowing system of consult--read.
Key Bindings
Source Code
;; Defined in ~/.emacs.d/elpa/consult-20260805.1130/consult.el
(defun consult-narrow (key)
"Narrow current completion with KEY.
This command is used internally by the narrowing system of `consult--read'."
(declare (completion ignore))
(interactive
(list (unless (equal (this-single-command-keys) (consult--widen-key))
last-command-event)))
(consult--require-minibuffer)
(setq consult--narrow key)
(when-let* ((pred (plist-get consult--narrow-config :predicate)))
(setq minibuffer-completion-predicate (and consult--narrow pred)))
(when consult--narrow-overlay
(delete-overlay consult--narrow-overlay))
(when consult--narrow
(setq consult--narrow-overlay
(consult--make-overlay
(1- (minibuffer-prompt-end)) (minibuffer-prompt-end)
'before-string
(format #(" [%s]" 0 5 (face consult-narrow-indicator))
(alist-get consult--narrow
(plist-get consult--narrow-config :keys))))))
(run-hooks 'consult--completion-refresh-hook))