]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/vc/log-view.el (log-view-diff-common): Use the previous revision
authorJuri Linkov <juri@linkov.net>
Mon, 13 May 2019 20:40:11 +0000 (23:40 +0300)
committerJuri Linkov <juri@linkov.net>
Mon, 13 May 2019 20:40:11 +0000 (23:40 +0300)
only when the end of the region is on a line after the last entry.
(Bug#35624)

lisp/vc/log-view.el

index e47fad89083c5abde90b52efc5f5a0bf3917c2fa..3389264ce6ed9f8adb652652bfd96c87993c66d9 100644 (file)
@@ -618,10 +618,11 @@ considered file(s)."
     ;; When TO and FR are the same, or when point is on a line after
     ;; the last entry, look at the previous revision.
     (when (or (string-equal fr to)
-              (>= (point)
+              (>= end
                   (save-excursion
-                    (goto-char (car fr-entry))
-                    (forward-line))))
+                    (goto-char end)
+                    (log-view-end-of-defun)
+                    (point))))
       (setq fr (vc-call-backend log-view-vc-backend 'previous-revision nil fr)))
     (vc-diff-internal
      t (list log-view-vc-backend