mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-10 13:40:36 -08:00
Jump to the current error in xref with zero prefix arg
* xref.el (xref--next-error-function): Handle the corner case of n == 0. (Bug#34462)
This commit is contained in:
parent
476066e89d
commit
c7e4bc974b
1 changed files with 4 additions and 2 deletions
|
|
@ -694,8 +694,10 @@ references displayed in the current *xref* buffer."
|
|||
(let ((backward (< n 0))
|
||||
(n (abs n))
|
||||
(xref nil))
|
||||
(dotimes (_ n)
|
||||
(setq xref (xref--search-property 'xref-item backward)))
|
||||
(if (= n 0)
|
||||
(setq xref (get-text-property (point) 'xref-item))
|
||||
(dotimes (_ n)
|
||||
(setq xref (xref--search-property 'xref-item backward))))
|
||||
(cond (xref
|
||||
;; Save the current position (when the buffer is visible,
|
||||
;; it gets reset to that window's point from time to time).
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue