Function: consult--line-point-placement
consult--line-point-placement is a byte-compiled function defined in
consult.el.
Signature
(consult--line-point-placement SELECTED CANDIDATES HIGHLIGHTED &rest IGNORED-FACES)
Documentation
Find point position on matching line.
SELECTED is the currently selected candidate. CANDIDATES is the list of candidates. HIGHLIGHTED is the highlighted string to determine the match position. IGNORED-FACES are ignored when determining the match position.
Source Code
;; Defined in ~/.emacs.d/elpa/consult-20260805.1130/consult.el
(defun consult--line-point-placement (selected candidates highlighted &rest ignored-faces)
"Find point position on matching line.
SELECTED is the currently selected candidate.
CANDIDATES is the list of candidates.
HIGHLIGHTED is the highlighted string to determine the match position.
IGNORED-FACES are ignored when determining the match position."
(when-let* ((pos (consult--lookup-location selected candidates)))
(if highlighted
(let* ((matches (apply #'consult--point-placement highlighted 0 ignored-faces))
(dest (+ pos (car matches))))
;; Only create a new marker when jumping across buffers (for example
;; `consult-line-multi'). Avoid creating unnecessary markers, when
;; scrolling through candidates, since creating markers is not free.
(when (and (markerp pos) (not (eq (marker-buffer pos) (current-buffer))))
(setq dest (move-marker (make-marker) dest (marker-buffer pos))))
(cons dest (cdr matches)))
pos)))