]> git.eshelyaron.com Git - emacs.git/commitdiff
(log-view-minor-wrap): Use the same logic to get revisions as `log-view-diff'.
authorJuri Linkov <juri@jurta.org>
Tue, 17 Jan 2006 00:51:30 +0000 (00:51 +0000)
committerJuri Linkov <juri@jurta.org>
Tue, 17 Jan 2006 00:51:30 +0000 (00:51 +0000)
lisp/log-view.el

index 7025a8932875d641bddc5e7a87ecb0ef36baa446..91320f08dd9abb718484626fae667ef0f35e1555 100644 (file)
 
 (defun log-view-minor-wrap (buf f)
   (let ((data (with-current-buffer buf
-               (cons
-                (cons (log-view-current-file)
-                      (log-view-current-tag))
-                (when mark-active
-                  (save-excursion
-                    (goto-char (mark))
-                    (cons (log-view-current-file)
-                          (log-view-current-tag))))))))
+               (let* ((beg (if mark-active (region-beginning) (point)))
+                      (end (if mark-active (region-end) (point)))
+                      (fr (log-view-current-tag beg))
+                      (to (log-view-current-tag end)))
+                 (when (string-equal fr to)
+                   (save-excursion
+                     (goto-char end)
+                     (log-view-msg-next)
+                     (setq to (log-view-current-tag))))
+                 (cons
+                  (cons (log-view-current-file) to)
+                  (cons (log-view-current-file) fr))))))
     (let ((cvs-branch-prefix (cdar data))
          (cvs-secondary-branch-prefix (and (cdar data) (cddr data)))
          (cvs-minor-current-files