[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: strange window behavior from vc-diff
From: |
Stefan Monnier |
Subject: |
Re: strange window behavior from vc-diff |
Date: |
Thu, 24 Jan 2008 09:11:39 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux) |
> I have two frames. In one frame is source, in the other frame, Gnus.
> I ran vc-diff in the source frame, then switched to the Gnus frame
> after the vc diff buffer appeared in a window.
> When the diff finished, the Gnus summary buffer shrank to just 3
> lines.
> I dug through the code a little, and I believe the problem is that
> vc-diff-sentinel calls shrink-window-if-larger-than-buffer. However,
> in my scenario, I think the selected window is not the VC diff window.
Indeed, I've installed the patch below in the 22 branch, which should
fix this problem.
Stefan
--- vc.el.~1.424.2.10.~ 2008-01-21 12:15:18.000000000 -0500
+++ vc.el 2008-01-24 09:09:08.000000000 -0500
@@ -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)