Browse Source

Fix indium-inspector-previous-reference so it works on 1st reference

* indium-inspector.el (indium-inspector-goto-reference): Fix the limit
  check when going backward.
tags/2.0.0
Damien Cassou 1 year ago
parent
commit
f0e21363d8
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      indium-inspector.el

+ 4
- 1
indium-inspector.el View File

@@ -95,11 +95,14 @@ DIRECTION can be either `next' or `previous'."
(let* ((delta (pcase direction
(`next 1)
(`previous -1)))
(limit-check (pcase direction
(`next #'eobp)
(`previous #'bobp)))
(reference (save-excursion
(forward-line delta)
(when (eq direction 'previous)
(end-of-line))
(while (and (not (eobp))
(while (and (not (funcall limit-check))
(not (get-text-property (point) 'indium-reference)))
(forward-char delta))
(when (get-text-property (point) 'indium-reference)

Loading…
Cancel
Save