Function: ghostel--skip-match-p
ghostel--skip-match-p is a natively compiled function defined in
ghostel-links.el.
Signature
(ghostel--skip-match-p FRAGMENTS RAW ACTIVE-BOUNDS)
Documentation
Return non-nil if the link over FRAGMENTS should not be applied.
RAW is the text this match is made of. Leaves alone what another
source owns (an OSC 8 span), the prompt, the line the cursor is on,
and a match whose link already covers this same text. A match whose
text changed, or that is only partly marked, is re-applied: the
renderer repaints the rows that changed, so the rows of a wrapped
link that did not change would otherwise keep pointing at text they
no longer hold. The test is on the text rather than on the resolved
target, so a cd — which moves default-directory under output that
never changed — leaves existing links pointing where they did.
ACTIVE-BOUNDS is a (BOL . EOL) cons covering the cursor's line.
Source Code
;; Defined in /nix/store/1252krff0gb2kisjcpp45m50cpdskfrl-emacs-packages-deps/share/emacs/site-lisp/ghostel-links.el
(defun ghostel--skip-match-p (fragments raw active-bounds)
"Return non-nil if the link over FRAGMENTS should not be applied.
RAW is the text this match is made of. Leaves alone what another
source owns (an OSC 8 span), the prompt, the line the cursor is on,
and a match whose link already covers this same text. A match whose
text changed, or that is only partly marked, is re-applied: the
renderer repaints the rows that changed, so the rows of a wrapped
link that did not change would otherwise keep pointing at text they
no longer hold. The test is on the text rather than on the resolved
target, so a `cd' — which moves `default-directory' under output that
never changed — leaves existing links pointing where they did.
ACTIVE-BOUNDS is a (BOL . EOL) cons covering the cursor's line."
(let ((skip nil)
(current t))
(pcase-dolist (`(,start . ,stop) fragments)
(when (or (get-text-property start 'ghostel-prompt)
(and active-bounds
(>= start (car active-bounds))
(<= start (cdr active-bounds)))
(ghostel--foreign-link-p start stop))
(setq skip t))
(unless (and (ghostel--detected-link-p start)
(equal raw (get-text-property start 'ghostel-link-text)))
(setq current nil)))
(or skip current)))