"Stephen J. Turnbull" <stephen(a)xemacs.org> writes:
If you don't get the echo area to return to one line height,
not executing the recipe correctly, or perhaps you've customized
`resize-minibuffer-window-exactly' to nil.
Indeed I had.
First, why is *any* permanent motion OK? If you want to push
down to zero or unassign yourself from the bug, that's one thing, but
but this is not backward compatible (assuming default settings), and
there's no specification that says this is desirable behavior or what
to expect in slightly different situations.
I didn't want to disassociate myself from the problem, just make sure
that its presence is confirmed if it's still there.
Anyway, I've figured out what caused this. (It has nothing to do with
window configurations.) The problem is that bumping the minibuffer size
up and then down again isn't symmetic. You can try this out by opening
up a frame on *scratch*, splitting it, and then doing this there:
(enlarge-window 1 nil (minibuffer-window (selected-frame)))
(enlarge-window -1 nil (minibuffer-window (selected-frame)))
The attached patch fixes this for me. You still (potentially) get a
small bit of permanent motion due to the rounding to the default text
height, but it stabilizes after the first roundtrip. If there are no
objections, I'll push this on Tuesday or so.
2008-04-26 Mike Sperber <mike(a)xemacs.org>
* window.c (set_window_pixsize): Round up when we're shrinking,
down when we're growing * to make sure that pairs of grow / shrink
meant to * cancel out actually do cancel out. This fixes a
problem with `resize-minibuffer-mode' where successive grow/shrink
actions are meant to cancel out, but previously didn't.
Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla
diff --git a/src/window.c b/src/window.c
＠＠ -3601,7 +3601,17 ＠＠
/* All but the last window should have a height which is
a multiple of the default line height. */
if (!NILP (c->next))
- pos = (pos / line_size) * line_size;
+ * Round up when we're shrinking, down when we're growing
+ * to make sure that pairs of grow / shrink meant to
+ * cancel out actually do cancel out.
+ if (pixel_adj_left < 0)
+ pos = ((pos + line_size -1) / line_size) * line_size;
+ pos = (pos / line_size) * line_size;
/* Avoid confusion: don't delete child if it becomes too small */
set_window_pixsize (child, pos + first - last_pos, 1, set_height);
XEmacs-Beta mailing list