From 6413f08887ccb4fa8049f4665bba4f77368f15c6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mattias=20Engdeg=C3=A5rd?= Date: Sat, 31 Jul 2021 22:37:03 +0200 Subject: [PATCH] Occur-mode multi-line match property gap filling When an occur-mode regexp matches across multiple lines, the spacing prefixes inserted between each did not have the `occur-target` property which is essential for jumping to the corresponding place in the target buffer. This prevented next-error and previous-error from working. * lisp/replace.el (occur-engine): Put the `occur-target` property on the continuation prefix to avoid the gap. --- lisp/replace.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/replace.el b/lisp/replace.el index d0c63669159..148b7ce48b1 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -2089,8 +2089,10 @@ See also `multi-occur'." "\n" (if prefix-face (propertize - "\n :" 'font-lock-face prefix-face) - "\n :") + "\n :" 'font-lock-face prefix-face + 'occur-target markers) + (propertize + "\n :" 'occur-target markers)) ;; Add mouse face in one section to ;; ensure the prefix and the string ;; get a contiguous highlight. -- 2.39.2