From: Stefan Monnier Date: Thu, 24 Jan 2008 14:12:10 +0000 (+0000) Subject: (vc-version-diff): Make sure we shrink the right window. X-Git-Tag: emacs-pretest-22.1.90~42 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ef5e3601471f4796cd04a0881ae241e79abea730;p=emacs.git (vc-version-diff): Make sure we shrink the right window. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 28d0cc19003..a4c7feae80d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2008-01-24 Stefan Monnier + + * vc.el (vc-version-diff): Make sure we shrink the right window. + 2008-01-23 Jason Rumney * lpr.el (printer-name): Do not set on MS Windows. diff --git a/lisp/vc.el b/lisp/vc.el index bbca76e2b90..e7fc52b5019 100644 --- a/lisp/vc.el +++ b/lisp/vc.el @@ -1853,7 +1853,8 @@ versions of all registered files in or below it." (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)