aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/progmodes/xref.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el
index 9522d7e475b..6974d000483 100644
--- a/lisp/progmodes/xref.el
+++ b/lisp/progmodes/xref.el
@@ -694,8 +694,10 @@ references displayed in the current *xref* buffer."
694 (let ((backward (< n 0)) 694 (let ((backward (< n 0))
695 (n (abs n)) 695 (n (abs n))
696 (xref nil)) 696 (xref nil))
697 (dotimes (_ n) 697 (if (= n 0)
698 (setq xref (xref--search-property 'xref-item backward))) 698 (setq xref (get-text-property (point) 'xref-item))
699 (dotimes (_ n)
700 (setq xref (xref--search-property 'xref-item backward))))
699 (cond (xref 701 (cond (xref
700 ;; Save the current position (when the buffer is visible, 702 ;; Save the current position (when the buffer is visible,
701 ;; it gets reset to that window's point from time to time). 703 ;; it gets reset to that window's point from time to time).