branch: scratch/add-vdiff
commit c6c959ddd788713314f66d8ec0e5fa71289d5a6c
Author: justbur <[email protected]>
Commit: justbur <[email protected]>

    Fix nth-change at beginning and end of buffer
---
 vdiff.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/vdiff.el b/vdiff.el
index a062d91..c290a20 100644
--- a/vdiff.el
+++ b/vdiff.el
@@ -848,8 +848,9 @@ folds in the region."
         (vdiff--maybe-exit-overlay reverse)
         (setq pnt (point))
         ;; Find next overlay
-        (while (and (not (or (eobp) (bobp)))
-                    (not (vdiff--change-at-point-p)))
+        (while (not (or (and reverse (bobp))
+                        (and (not reverse) (eobp))
+                        (vdiff--change-at-point-p)))
           (setq pnt
                 (goto-char (if reverse
                                (previous-overlay-change pnt)

Reply via email to