changeset 68221:4804f7b39bfe

(log-view-minor-wrap): Use the same logic to get revisions as `log-view-diff'.
author Juri Linkov <juri@jurta.org>
date Tue, 17 Jan 2006 00:51:30 +0000
parents 87b296ffb009
children c18c4be711f4
files lisp/log-view.el
diffstat 1 files changed, 12 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/log-view.el	Tue Jan 17 00:00:24 2006 +0000
+++ b/lisp/log-view.el	Tue Jan 17 00:51:30 2006 +0000
@@ -225,14 +225,18 @@
 
 (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