changeset 79914:7145a0db2111

(vc-version-diff): Make sure we shrink the right window.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Thu, 24 Jan 2008 14:12:10 +0000
parents a3528f09f3e9
children e54d9b453e0e
files lisp/ChangeLog lisp/vc.el
diffstat 2 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Wed Jan 23 08:01:01 2008 +0000
+++ b/lisp/ChangeLog	Thu Jan 24 14:12:10 2008 +0000
@@ -1,3 +1,7 @@
+2008-01-24  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* vc.el (vc-version-diff): Make sure we shrink the right window.
+
 2008-01-23  Jason Rumney  <jasonr@gnu.org>
 
 	* lpr.el (printer-name): Do not set on MS Windows.
--- a/lisp/vc.el	Wed Jan 23 08:01:01 2008 +0000
+++ b/lisp/vc.el	Thu Jan 24 14:12:10 2008 +0000
@@ -1853,7 +1853,8 @@
 		      (if (eq (buffer-size) 0)
 			  (insert "No differences found.\n"))
 		      (goto-char (point-min))
-		      (shrink-window-if-larger-than-buffer)))
+                      (let ((win (get-buffer-window (current-buffer) t)))
+                        (if win (shrink-window-if-larger-than-buffer win)))))
     t))
 
 (defun vc-diff-label (file file-rev rev)