From ef5e3601471f4796cd04a0881ae241e79abea730 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Thu, 24 Jan 2008 14:12:10 +0000 Subject: [PATCH] (vc-version-diff): Make sure we shrink the right window. --- lisp/ChangeLog | 4 ++++ lisp/vc.el | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) 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) -- 2.39.2