bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#35624: log-view-diff regression


From: Juri Linkov
Subject: bug#35624: log-view-diff regression
Date: Sat, 11 May 2019 23:58:49 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu)

> I kind of think that the feature the last change added is more valuable
> than the regression (especially if the regression is only triggered when
> a commit message is expanded).

It is triggered not only when a commit message is expanded.
Also it is triggered on single-file logs.  Admittedly, my previous patch
didn't take this into account.  Here is a new patch that works also
for single-file logs.  It relies on the function 'log-view-end-of-defun'
that takes care about the "Show 2X entries" footer:

diff --git a/lisp/vc/log-view.el b/lisp/vc/log-view.el
index e47fad8908..3389264ce6 100644
--- a/lisp/vc/log-view.el
+++ b/lisp/vc/log-view.el
@@ -618,10 +618,11 @@ log-view-diff-common
     ;; 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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]