branch: externals/urgrep
commit 224fa266ccfca25ee7660d42051f79402dbf05d1
Author: Jim Porter <jporterb...@gmail.com>
Commit: Jim Porter <jporterb...@gmail.com>

    Fix fontification on Emacs 28
    
    Under older Emacsen, `text-property-search-backward` behaves differently, 
and
    skips past text with the property in question if point is immediately after 
the
    end of where that property is set.
---
 urgrep.el | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/urgrep.el b/urgrep.el
index 479052611b..da86bf5e98 100644
--- a/urgrep.el
+++ b/urgrep.el
@@ -987,9 +987,8 @@ For more details on the change, see
 (defun urgrep--grouped-filename ()
   "Look backwards for the filename when a match is found in grouped output."
   (save-excursion
-    (goto-char (match-beginning 0))
     (if-let* (;; Make sure the line doesn't start with a filename...
-              ((not (get-text-property (point) 'urgrep-file-name)))
+              ((not (get-text-property (match-beginning 0) 'urgrep-file-name)))
               ;; ... and that we've seen a file name previously.
               (match (text-property-search-backward 'urgrep-file-name)))
         (buffer-substring-no-properties (prop-match-beginning match)

Reply via email to