GNU bug report logs -
#4534
assertion failure at window.c:grow_mini_window
Previous Next
Full log
Message #50 received at 4534 <at> emacsbugs.donarmstrong.com (full text, mbox):
>> Would writing
>>
>> if (height > WINDOW_TOTAL_LINES (w))
>> {
>> freeze_window_starts (f, 1);
>> grow_mini_window (w, height - WINDOW_TOTAL_LINES (w));
>> }
>>
>> instead do better?
>
> In my case, height < WINDOW_TOTAL_LINES (w) at that point (that's what
> triggers the xassert), so adding the above check works exactly like
> removing the if() altogether: it does not crash, but it does not
> shrink the minibuffer to 5 lines, which would be the correct height.
Seems I'm too silly to understand what's going on in resize_mini_window.
Apparently
if (EQ (Vresize_mini_windows, Qgrow_only))
... fails so ...
else
... gets executed ...
{
/* Always resize to exact size needed. */
if (height > WINDOW_TOTAL_LINES (w))
... fails again, so ...
else if (height < WINDOW_TOTAL_LINES (w))
... we're here ...
{
int old_height = WINDOW_TOTAL_LINES (w);
freeze_window_starts (f, 0);
shrink_mini_window (w);
... should resize the mini_window down to one line ...
if (height)
{
freeze_window_starts (f, 1);
... and the following causes the assertion failure to
trigger because the second arguments gets less
than zero ...
grow_mini_window (w, height - WINDOW_TOTAL_LINES (w));
}
window_height_changed_p = WINDOW_TOTAL_LINES (w) != old_height;
}
}
Now if I replace the check
if (height)
by
if (height > WINDOW_TOTAL_LINES (w))
I should be able to avoid the delta = -1 assertion failure in
grow_mini_window. Can you confirm my reasoning so far?
The fact that `height' is something like zero or less seems to stem from
some miscalculation (probably caused by the line-wrapping part) earlier
in the code of resize_mini_window. If that's so could you try to find
out why height is not at least one line?
martin
This bug report was last modified 15 years and 216 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.