Fix log-view-diff-common when point is after last entry
Bug#28466 * lisp/vc/log-view.el (log-view-diff-common): If point is after last entry, look at the previous revision.
This commit is contained in:
parent
3f006b56cd
commit
066efb8666
1 changed files with 10 additions and 4 deletions
|
@ -608,10 +608,16 @@ considered file(s)."
|
|||
(log-view-diff-common beg end t)))
|
||||
|
||||
(defun log-view-diff-common (beg end &optional whole-changeset)
|
||||
(let ((to (log-view-current-tag beg))
|
||||
(fr (log-view-current-tag end)))
|
||||
(when (string-equal fr to)
|
||||
;; TO and FR are the same, look at the previous revision.
|
||||
(let* ((to (log-view-current-tag beg))
|
||||
(fr-entry (log-view-current-entry end))
|
||||
(fr (cadr fr-entry)))
|
||||
;; 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)
|
||||
(save-excursion
|
||||
(goto-char (car fr-entry))
|
||||
(forward-line))))
|
||||
(setq fr (vc-call-backend log-view-vc-backend 'previous-revision nil fr)))
|
||||
(vc-diff-internal
|
||||
t (list log-view-vc-backend
|
||||
|
|
Loading…
Add table
Reference in a new issue