After a successful call to 'outline-search-function'
set the end of the match data to the end of the line
that is equivalent to adding ".*" in the regexp.
This accompanies the recent change in 'outline-font-lock-keywords'.
(cherry picked from commit
6c3a995ed535f9fb492461a53442e4d8bd4deb17)
(let ((regexp (unless outline-search-function
(concat "^\\(?:" outline-regexp "\\).*$"))))
(while (if outline-search-function
- (funcall outline-search-function)
+ (when-let* ((ret (funcall outline-search-function)))
+ ;; This is equivalent to adding ".*" in the regexp above.
+ (set-match-data (list (match-beginning 0) (pos-eol)))
+ ret)
(re-search-forward regexp nil t))
(let ((overlay (make-overlay (match-beginning 0) (match-end 0))))
(overlay-put overlay 'outline-highlight t)