emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master e1ed0c3 2/3: Fix xref {prev, next}-error target buffer match high


From: Mattias Engdegård
Subject: master e1ed0c3 2/3: Fix xref {prev, next}-error target buffer match highlighting extent
Date: Fri, 20 Aug 2021 07:32:30 -0400 (EDT)

branch: master
commit e1ed0c3af182b313f8f1a8f0d50fcda369aaf71c
Author: Mattias Engdegård <mattiase@acm.org>
Commit: Mattias Engdegård <mattiase@acm.org>

    Fix xref {prev,next}-error target buffer match highlighting extent
    
    * lisp/progmodes/xref.el (xref--next-error-function):
    Bind `xref--current-item` during the call to `xref--show-location` so
    that `xref-pulse-momentarily` finds the match extent.
---
 lisp/progmodes/xref.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el
index d3780d5..b6ad485 100644
--- a/lisp/progmodes/xref.el
+++ b/lisp/progmodes/xref.el
@@ -877,7 +877,8 @@ beginning of the line."
            ;; it gets reset to that window's point from time to time).
            (let ((win (get-buffer-window (current-buffer))))
              (and win (set-window-point win (point))))
-           (xref--show-location (xref-item-location xref) t))
+           (let ((xref--current-item xref))
+             (xref--show-location (xref-item-location xref) t)))
           (t
            (error "No %s xref" (if backward "previous" "next"))))))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]